Skip navigation links


com.fatwire.cs.core.search.engine
Interface SearchEngine


public interface SearchEngine

SearchEngine is the Content Server abstraction of the search engine that would be used for indexing and searching of Content Server data. It supports operations of index and search


Method Summary
 void index(IndexSource source)
          The method indexes the IndexSource supplied to the IndexSource indicatd and store the indexed information in the configured search engine.
 SearchResult<ResultRow> search(java.util.List<java.lang.String> sourceNames, QueryExpression q)
          Searches the index sources with the given QueryExpression and return the SearchResult from the search operation.
 void setIndexSourceConfig(IndexSourceConfig config)
          Sets the controller class for the IndexSource so that the SearchEngine will be able to access the index source information given name.
 void setMetadata(SearchEngineMetadata metadata)
          Sets the metadata information for this SearchEngine.
 void setQueryConverter(QueryConverter qc)
          Sets the QueryConverter that will be used by the SearchEngine in indexing and searching.

 

Method Detail

index

void index(IndexSource source)
           throws SearchEngineException
The method indexes the IndexSource supplied to the IndexSource indicatd and store the indexed information in the configured search engine. We use this method to hanle all the indexing operations including add, update and delete.
Parameters:
source - supplies the data that needs to be indexed into this SearchEngine
Throws:
SearchEngineException - will be thrown when error occurs in indexing operation

search

SearchResult<ResultRow> search(java.util.List<java.lang.String> sourceNames,
                               QueryExpression q)
                               throws SearchEngineException
Searches the index sources with the given QueryExpression and return the SearchResult from the search operation. This method will search against all the index sources supplied, however, the ranking of the return will not be done at the search engine level.
Parameters:
sourceNames - the list of index source names that this search operation will be against
q - the QueryExpression that the search will use
Returns:
the SearchResult, which is an Interator of ResultRow
Throws:
SearchEngineException - will be thrown when error occurs in indexing operation

setIndexSourceConfig

void setIndexSourceConfig(IndexSourceConfig config)
Sets the controller class for the IndexSource so that the SearchEngine will be able to access the index source information given name.
Parameters:
config - the IndexSurceConfig which could access the index source configuration information in Content Server

setQueryConverter

void setQueryConverter(QueryConverter qc)
Sets the QueryConverter that will be used by the SearchEngine in indexing and searching. One should supply the QueryConverter that would convert the QueryExpression to the format that this SearchEngine would understand
Parameters:
qc - the QueryConverter instance that will be used

setMetadata

void setMetadata(SearchEngineMetadata metadata)
Sets the metadata information for this SearchEngine. Metadata contains the necessary configuration information for SearchEngine such as where to index/search, default QueryConverter class and properties specified
Parameters:
metadata - the SearchEngienMetadata instance for this SearchEngine

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.