com.bea.content.repo.server
Interface SearchEngine


public interface SearchEngine

The interface to the specific implementation of the search engine used by the CM.


Field Summary
static String DATABASE_PREFIX
           
 
Method Summary
 int deleteDocuments(String key)
          Instructs the search engine to delete the specified documents from its database(s).
 ID[] executeQuery(com.bea.content.expression.FullTextSearch expression, RepositoryId repositoryId, int maxResults)
          Submits a Query to the search engine
 int importData(String filename)
          Instructs the search engine's connector to import the specified file.
 void initialize(IRepositoryConfig repoConfig)
          This method is called by the SearchEngineFactory and is therefore not required to be used by a client of the SearchEngine
 boolean isAllIndexingComplete()
          Checks whether all currently received index commands have completed, waiting until they have.
 

Field Detail

DATABASE_PREFIX

static final String DATABASE_PREFIX
See Also
Constants Summary
Method Detail

initialize

void initialize(IRepositoryConfig repoConfig)
                throws RepositoryException
This method is called by the SearchEngineFactory and is therefore not required to be used by a client of the SearchEngine

Parameters
repoConfig - The configuration for the repository
Throws
RepositoryException

executeQuery

ID[] executeQuery(com.bea.content.expression.FullTextSearch expression,
                  RepositoryId repositoryId,
                  int maxResults)
                  throws RepositoryException
Submits a Query to the search engine

Parameters
expression - The FullTextSearch value object containing query parameters
repositoryId -
maxResults - The maximum number of results to return from the query
Returns
IDs of nodes found by the search.
Throws
RepositoryException

importData

int importData(String filename)
               throws RepositoryException
Instructs the search engine's connector to import the specified file.

Parameters
filename - The name of the file to import
Returns
The command id of the invocation. 0 if the command was not executed.
Throws
RepositoryException

isAllIndexingComplete

boolean isAllIndexingComplete()
                              throws RepositoryException
Checks whether all currently received index commands have completed, waiting until they have. If the maximum number of invocations of the IndexerGetStatus command has been reached, no more calls will be made and this method will return with a boolean to indicate whether all indexing has completed or not. (CR 242071: Add the ability to determine when indexing is complete)

Returns
true - if all index commands in the queue have completed. false - if any one index command does not have a status of "finished" (-1) or the maximum number of invocations for the IndexerGetStatus command has been reached without all commands completing.
Throws
RepositoryException

deleteDocuments

int deleteDocuments(String key)
                    throws RepositoryException
Instructs the search engine to delete the specified documents from its database(s).

Parameters
key - The key to use in selecting documents for deletion
Returns
The number of documents deleted.
Throws
RepositoryException


Copyright © 2011, Oracle. All rights reserved.