railo.runtime.search
Class SearchEngineSupport
java.lang.Object
railo.runtime.search.SearchEngineSupport
- All Implemented Interfaces:
- SearchEngine
- Direct Known Subclasses:
- LuceneSearchEngine
public abstract class SearchEngineSupport
- extends Object
- implements SearchEngine
SearchEngineSupport
public SearchEngineSupport()
init
public void init(Config config,
Resource searchDir,
LogAndSource log)
throws SAXException,
IOException,
SearchException
- Description copied from interface:
SearchEngine
- constructor of the class
- Specified by:
init
in interface SearchEngine
searchDir
- directory where the railo xml file is
- Throws:
SAXException
IOException
SearchException
getCollectionByName
public final SearchCollection getCollectionByName(String name)
throws SearchException
- Description copied from interface:
SearchEngine
- returns a collection by name
- Specified by:
getCollectionByName
in interface SearchEngine
- Parameters:
name
- name of the desired collection (case insensitive)
- Returns:
- returns lucene collection object matching name
- Throws:
SearchException
- if no matching Collection exist
getCollectionsAsQuery
public final Query getCollectionsAsQuery()
- Specified by:
getCollectionsAsQuery
in interface SearchEngine
- Returns:
- returns all collections as a query object
createCollection
public final SearchCollection createCollection(String name,
Resource path,
String language,
boolean allowOverwrite)
throws SearchException
- Description copied from interface:
SearchEngine
- Creates a new Collection and Store it (creating always a spellindex)
- Specified by:
createCollection
in interface SearchEngine
- Parameters:
name
- The Name of the Collectionpath
- the path to storelanguage
- The language of the collection
- Returns:
- New SearchCollection
- Throws:
SearchException
getDirectory
public Resource getDirectory()
- Specified by:
getDirectory
in interface SearchEngine
- Returns:
- returns the directory of the search storage
getLogger
public LogAndSource getLogger()
- Specified by:
getLogger
in interface SearchEngine
- Returns:
- returns the logfile of the search storage
getIndexElement
public Element getIndexElement(Element collElement,
String id)
- Description copied from interface:
SearchEngine
- return XML Element Matching index id
- Specified by:
getIndexElement
in interface SearchEngine
- Parameters:
collElement
- XML Collection Element
- Returns:
- XML Element
getDisplayName
public abstract String getDisplayName()
- Specified by:
getDisplayName
in interface SearchEngine
- Returns:
- returns the Name of the search engine to display in admin
Copyright © 2012 Railo