Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.api.backend
Interface SearchEngineBackend

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractSearchEngineBackend, CoreSearchBackend

public interface SearchEngineBackend
extends java.io.Serializable

Search engine backend interface.

You must implement this interface to register a new backend implementation against the search service.

Author:
Julien Anguenot
See Also:
AbstractSearchEngineBackend

Method Summary
 void clear()
          Clear all the indexes.
 void closeSession(java.lang.String sid)
          Closes a search service session given its session id.
 SearchServiceSession createSession()
          Opens a new session.
 void deleteAggregatedResources(java.lang.String key)
          Deletes an index given an aggregated resources key This will remove all resources indexed with key as key used to identified the set ot resources.
 void deleteAtomicResource(java.lang.String key)
          Deletes an atomic resource given its key.
 java.lang.String getConfigurationFileName()
          Get configuration file name if any.
 java.lang.String getName()
          Returns the plugin name.
 java.util.List<java.lang.String> getSupportedAnalyzersFor()
          Returns the supported analyers.
 java.util.List<java.lang.String> getSupportedFieldTypes()
          Returns the supported field types.
 void index(ResolvedResources resources)
          Index a set of resources.
 void saveAllSessions()
          Save all pending sessions.
 ResultSet searchQuery(ComposedNXQuery nxqlQuery, int offset, int range)
          Searches results given an NXQL query.
 ResultSet searchQuery(NativeQuery nativeQuery, int offset, int range)
          Searches results given a native query.
 ResultSet searchQuery(NativeQueryString queryString, int offset, int range)
          Searches results given a backened specific native query string.
 void setConfigurationFileName(java.lang.String configurationFileName)
          Set the configuration filr name for this backend.
 void setName(java.lang.String name)
          Set the name of the plugin.
 

Method Detail

getName

java.lang.String getName()
Returns the plugin name.


setName

void setName(java.lang.String name)
Set the name of the plugin.

Parameters:
name - : the name of the plugin.

getConfigurationFileName

java.lang.String getConfigurationFileName()
Get configuration file name if any.

Expected to be loadable in the classpath.

This aimed at being optional. See backend descriptor in core.

Returns:
the configuration file name.

setConfigurationFileName

void setConfigurationFileName(java.lang.String configurationFileName)
Set the configuration filr name for this backend.

This aimed at being optional. See backend descriptor in core.

Parameters:
configurationFileName - : the name of the configuration file with extension.

index

void index(ResolvedResources resources)
           throws IndexingException
Index a set of resources.

Parameters:
resources - : ResolvedResources instance.
Throws:
IndexingException

deleteAggregatedResources

void deleteAggregatedResources(java.lang.String key)
                               throws IndexingException
Deletes an index given an aggregated resources key

This will remove all resources indexed with key as key used to identified the set ot resources. See ResolvedResources.getId()

Parameters:
key - : aggregated resources key.
Throws:
IndexingException

deleteAtomicResource

void deleteAtomicResource(java.lang.String key)
                          throws IndexingException
Deletes an atomic resource given its key.

This will remove the resource identified by this resource key only.

Parameters:
key - : atomic resource key
Throws:
IndexingException

clear

void clear()
           throws IndexingException
Clear all the indexes.

Throws:
IndexingException

searchQuery

ResultSet searchQuery(ComposedNXQuery nxqlQuery,
                      int offset,
                      int range)
                      throws SearchException
Searches results given an NXQL query.

Parameters:
nxqlQuery - : a native NXP query
offset - pagination start
range - number of results.
Returns:
a result set instance
Throws:
SearchException - if an error occured while performing the search

searchQuery

ResultSet searchQuery(NativeQueryString queryString,
                      int offset,
                      int range)
                      throws SearchException,
                             QueryException
Searches results given a backened specific native query string.

Parameters:
queryString - : a backened specific native query string wrapper
offset - pagination start
range - pagination stop
Returns:
a result set instance
Throws:
SearchException
QueryException

searchQuery

ResultSet searchQuery(NativeQuery nativeQuery,
                      int offset,
                      int range)
                      throws SearchException,
                             QueryException
Searches results given a native query.

Parameters:
nativeQuery - : a backened specific native query wrapper.
offset - pagination start
range - pagination stop
Returns:
a result set instance
Throws:
SearchException - if an error occured while performing the search
QueryException - if the query is invalid or unsupported

getSupportedAnalyzersFor

java.util.List<java.lang.String> getSupportedAnalyzersFor()
Returns the supported analyers.

Returns:
a list of identifiers.

getSupportedFieldTypes

java.util.List<java.lang.String> getSupportedFieldTypes()
Returns the supported field types.

Returns:
a list of identifiers.

createSession

SearchServiceSession createSession()
Opens a new session.

Returns:
a new backend session id

closeSession

void closeSession(java.lang.String sid)
Closes a search service session given its session id.


saveAllSessions

void saveAllSessions()
                     throws IndexingException
Save all pending sessions.

Throws:
IndexingException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.