org.xcmis.search
Class SearchService

java.lang.Object
  extended by org.xcmis.search.SearchService
All Implemented Interfaces:
ContentModificationListener, Searcher, Startable

public class SearchService
extends Object
implements Startable, ContentModificationListener, Searcher

Main entry point to the search service.


Field Summary
protected  SearchServiceConfiguration configuration
          Configuration of search service.
 
Constructor Summary
SearchService(SearchServiceConfiguration configuration)
           
 
Method Summary
protected  void addQueryableIndexStorageInterceptor(InterceptorChain interceptorChain)
          Add interceptors that handle ModifyIndexCommand and ExecuteSelectorCommand
 List<ScoredRow> execute(org.xcmis.search.model.Query query)
          Execute query.
 List<ScoredRow> execute(org.xcmis.search.model.Query query, Map<String,Object> bindVariablesValues)
          Execute query.
 List<ScoredRow> execute(org.xcmis.search.model.Query query, Map<String,Object> bindVariablesValues, InvocationContext invocationContext)
          Execute query.
 void start()
           
 void stop()
           
 void update(ContentEntry addedEntry, String removedEntry)
          Notify listener about changes in content.
 void update(List<ContentEntry> addedEntries, Set<String> removedEntries)
          Notify listener about changes in content with default InvocationContext.
 void update(List<ContentEntry> addedEntries, Set<String> removedEntries, InvocationContext invocationContext)
          Notify listener about changes in content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected final SearchServiceConfiguration configuration
Configuration of search service.

Constructor Detail

SearchService

public SearchService(SearchServiceConfiguration configuration)
              throws SearchServiceException
Parameters:
configuration - SearchServiceConfiguration
Throws:
SearchServiceException
Method Detail

execute

public List<ScoredRow> execute(org.xcmis.search.model.Query query)
                        throws org.xcmis.search.InvalidQueryException,
                               QueryExecutionException
Execute query.

Specified by:
execute in interface Searcher
Parameters:
query - Query
Returns:
Throws:
InvalidQueryException, - QueryExecutionException
org.xcmis.search.InvalidQueryException
QueryExecutionException

execute

public List<ScoredRow> execute(org.xcmis.search.model.Query query,
                               Map<String,Object> bindVariablesValues)
                        throws org.xcmis.search.InvalidQueryException,
                               QueryExecutionException
Execute query.

Specified by:
execute in interface Searcher
Parameters:
query - Query
bindVariablesValues - Map
Returns:
List
Throws:
InvalidQueryException, - QueryExecutionException
org.xcmis.search.InvalidQueryException
QueryExecutionException

execute

public List<ScoredRow> execute(org.xcmis.search.model.Query query,
                               Map<String,Object> bindVariablesValues,
                               InvocationContext invocationContext)
                        throws org.xcmis.search.InvalidQueryException,
                               QueryExecutionException
Description copied from interface: Searcher
Execute query.

Specified by:
execute in interface Searcher
Returns:
Throws:
org.xcmis.search.InvalidQueryException
QueryExecutionException
See Also:
Searcher.execute(org.xcmis.search.model.Query, java.util.Map, org.xcmis.search.content.command.InvocationContext)

start

public void start()
Specified by:
start in interface Startable
See Also:
Startable.start()

stop

public void stop()
Specified by:
stop in interface Startable
See Also:
Startable.stop()

update

public void update(ContentEntry addedEntry,
                   String removedEntry)
            throws IndexModificationException
Description copied from interface: ContentModificationListener
Notify listener about changes in content.

Specified by:
update in interface ContentModificationListener
Parameters:
addedEntry - - added content
removedEntry - - removed content
Throws:
IndexModificationException
See Also:
ContentModificationListener.update(org.xcmis.search.content.ContentEntry, java.lang.String)

update

public void update(List<ContentEntry> addedEntries,
                   Set<String> removedEntries)
            throws IndexModificationException
Description copied from interface: ContentModificationListener
Notify listener about changes in content with default InvocationContext.

Specified by:
update in interface ContentModificationListener
Parameters:
addedEntries - - added content
removedEntries - - removed content
Throws:
IndexModificationException
See Also:
ContentModificationListener.update(java.util.List, java.util.Set)

update

public void update(List<ContentEntry> addedEntries,
                   Set<String> removedEntries,
                   InvocationContext invocationContext)
            throws IndexModificationException
Description copied from interface: ContentModificationListener
Notify listener about changes in content.

Specified by:
update in interface ContentModificationListener
Parameters:
addedEntries - - added content
removedEntries - - removed content
Throws:
IndexModificationException
See Also:
ContentModificationListener.update(java.util.List, java.util.Set, org.xcmis.search.content.command.InvocationContext)

addQueryableIndexStorageInterceptor

protected void addQueryableIndexStorageInterceptor(InterceptorChain interceptorChain)
                                            throws SearchServiceException
Add interceptors that handle ModifyIndexCommand and ExecuteSelectorCommand

Parameters:
interceptorChain - InterceptorChain
Throws:
SearchServiceException - if error occurs


Copyright © 2010 eXo Platform SAS. All Rights Reserved.