001 package railo.runtime.search.lucene2; 002 003 import railo.commons.io.res.Resource; 004 import railo.runtime.search.SearchCollection; 005 import railo.runtime.search.SearchEngineSupport; 006 import railo.runtime.search.SearchException; 007 import railo.runtime.type.dt.DateTime; 008 import railo.runtime.type.dt.DateTimeImpl; 009 010 /** 011 * 012 */ 013 public final class LuceneSearchEngine extends SearchEngineSupport { 014 015 public LuceneSearchEngine() { 016 017 } 018 019 /** 020 * @see railo.runtime.search.coreDuplicate.SearchEngineSupport#_createCollection(java.lang.String, railo.commons.io.res.Resource, java.lang.String) 021 */ 022 public SearchCollection _createCollection(String name, Resource path, String language) throws SearchException { 023 //SearchUtil.getAnalyzer(language); 024 return new LuceneSearchCollection(this,name,path,language,new DateTimeImpl(),new DateTimeImpl()); 025 } 026 027 /** 028 * @see railo.runtime.search.SearchEngine#_removeCollection(railo.runtime.search.SearchCollection) 029 */ 030 public void _removeCollection(SearchCollection collection) throws SearchException { 031 //throw new SearchException("Lucene Search Engine not implemeted"); 032 } 033 034 /** 035 * @see railo.runtime.search.coreDuplicate.SearchEngineSupport#_readCollection(java.lang.String, railo.commons.io.res.Resource, java.lang.String, railo.runtime.type.dt.DateTime, railo.runtime.type.dt.DateTime) 036 */ 037 public SearchCollection _readCollection(String name, Resource path, String language, DateTime lastUpdate, DateTime created) throws SearchException { 038 //throw new SearchException("Lucene Search Engine not implemeted"); 039 return new LuceneSearchCollection(this,name,path,language,lastUpdate,created); 040 } 041 042 /** 043 * @see railo.runtime.search.SearchEngine#getDisplayName() 044 */ 045 public String getDisplayName() { 046 return "Lucene Search Engine"; 047 } 048 049 050 }