Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.search.backend.core
Class CoreSearchBackend

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.core.search.api.backend.impl.AbstractSearchEngineBackend
          extended by org.nuxeo.ecm.platform.search.backend.core.CoreSearchBackend
All Implemented Interfaces:
java.io.Serializable, SearchEngineBackend, Adaptable, Component, Extensible

public class CoreSearchBackend
extends AbstractSearchEngineBackend

Search engine backend that delegates to the core.

Author:
Florent Guillaume
See Also:
Serialized Form

Constructor Summary
CoreSearchBackend()
           
 
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.
 void index(ResolvedResources resources)
          Index a set of resources.
 void saveAllSessions()
          Save all pending sessions.
 ResultSet searchQuery(ComposedNXQuery nxQuery, int offset, int limit)
          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.
 
Methods inherited from class org.nuxeo.ecm.core.search.api.backend.impl.AbstractSearchEngineBackend
getConfigurationFileName, getName, getSupportedAnalyzersFor, getSupportedFieldTypes, registerContribution, setConfigurationFileName, setName
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, deactivate, getAdapter, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreSearchBackend

public CoreSearchBackend()
Method Detail

createSession

public SearchServiceSession createSession()
Description copied from interface: SearchEngineBackend
Opens a new session.

Returns:
a new backend session id

closeSession

public void closeSession(java.lang.String sid)
Description copied from interface: SearchEngineBackend
Closes a search service session given its session id.


saveAllSessions

public void saveAllSessions()
Description copied from interface: SearchEngineBackend
Save all pending sessions.


clear

public void clear()
           throws IndexingException
Description copied from interface: SearchEngineBackend
Clear all the indexes.

Throws:
IndexingException

index

public void index(ResolvedResources resources)
Description copied from interface: SearchEngineBackend
Index a set of resources.

Parameters:
resources - : ResolvedResources instance.

deleteAggregatedResources

public void deleteAggregatedResources(java.lang.String key)
Description copied from interface: SearchEngineBackend
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.

deleteAtomicResource

public void deleteAtomicResource(java.lang.String key)
Description copied from interface: SearchEngineBackend
Deletes an atomic resource given its key.

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

Parameters:
key - : atomic resource key

searchQuery

public ResultSet searchQuery(NativeQueryString queryString,
                             int offset,
                             int range)
                      throws QueryException
Description copied from interface: SearchEngineBackend
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:
QueryException

searchQuery

public ResultSet searchQuery(NativeQuery nativeQuery,
                             int offset,
                             int range)
                      throws QueryException
Description copied from interface: SearchEngineBackend
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:
QueryException - if the query is invalid or unsupported

searchQuery

public ResultSet searchQuery(ComposedNXQuery nxQuery,
                             int offset,
                             int limit)
                      throws SearchException
Description copied from interface: SearchEngineBackend
Searches results given an NXQL query.

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.