railo.runtime.search
Interface SearchEngine

All Known Implementing Classes:
LuceneSearchEngine, SearchEngineSupport

public interface SearchEngine

interface for a Search Engine


Field Summary
static boolean ALLOW_OVERWRITE
          overwrite allowed
static boolean DENY_OVERWRITE
          overwrite denied
 
Method Summary
 SearchCollection createCollection(String name, Resource path, String language, boolean allowOverwrite)
          Creates a new Collection and Store it (creating always a spellindex)
 SearchCollection getCollectionByName(String name)
          returns a collection by name
 Query getCollectionsAsQuery()
           
 Resource getDirectory()
           
 String getDisplayName()
           
 Element getIndexElement(Element collElement, String id)
          return XML Element Matching index id
 LogAndSource getLogger()
           
 void init(Config config, Resource searchDir, LogAndSource log)
          constructor of the class
 

Field Detail

ALLOW_OVERWRITE

static final boolean ALLOW_OVERWRITE
overwrite allowed

See Also:
Constant Field Values

DENY_OVERWRITE

static final boolean DENY_OVERWRITE
overwrite denied

See Also:
Constant Field Values
Method Detail

init

void init(Config config,
          Resource searchDir,
          LogAndSource log)
          throws SAXException,
                 IOException,
                 SearchException
constructor of the class

Parameters:
config -
searchDir - directory where the railo xml file is
log -
Throws:
IOException
SAXException
SearchException

getCollectionByName

SearchCollection getCollectionByName(String name)
                                     throws SearchException
returns a collection by name

Parameters:
name - name of the desired collection (case insensitive)
Returns:
returns lucene collection object matching name
Throws:
SearchException - if no matching Collection exist

getCollectionsAsQuery

Query getCollectionsAsQuery()
Returns:
returns all collections as a query object

createCollection

SearchCollection createCollection(String name,
                                  Resource path,
                                  String language,
                                  boolean allowOverwrite)
                                  throws SearchException
Creates a new Collection and Store it (creating always a spellindex)

Parameters:
name - The Name of the Collection
path - the path to store
language - The language of the collection
allowOverwrite -
Returns:
New SearchCollection
Throws:
SearchException

getDirectory

Resource getDirectory()
Returns:
returns the directory of the search storage

getLogger

LogAndSource getLogger()
Returns:
returns the logfile of the search storage

getIndexElement

Element getIndexElement(Element collElement,
                        String id)
return XML Element Matching index id

Parameters:
collElement - XML Collection Element
id -
Returns:
XML Element

getDisplayName

String getDisplayName()
Returns:
returns the Name of the search engine to display in admin


Copyright © 2012 Railo