org.xcmis.search.lucene
Class AbstractLuceneQueryableIndexStorage

java.lang.Object
  extended by org.xcmis.search.content.interceptors.AbstractVisitor
      extended by org.xcmis.search.content.interceptors.CommandInterceptor
          extended by org.xcmis.search.content.interceptors.QueryableIndexStorage
              extended by org.xcmis.search.lucene.AbstractLuceneQueryableIndexStorage
All Implemented Interfaces:
Visitor, Startable
Direct Known Subclasses:
InMemoryLuceneQueryableIndexStorage, LuceneQueryableIndexStorage

public abstract class AbstractLuceneQueryableIndexStorage
extends QueryableIndexStorage

Base implementation of Lucene based QueryableIndexStorage.


Field Summary
protected  IndexConfiguration indexConfuguration
          Index configuration.
protected static int MAX_FETCH_SIZE
          The upper limit for the initial fetch size.
protected  NameConverter nameConverter
          Convert one Sting name to other String name.
protected  LuceneIndexer nodeIndexer
          Node indexer.
protected  PathSplitter pathSplitter
          Split path string to names.
protected  VirtualTableResolver tableResolver
          Reselve selector names to lucene querys.
 
Fields inherited from class org.xcmis.search.content.interceptors.QueryableIndexStorage
serviceConfuguration
 
Constructor Summary
AbstractLuceneQueryableIndexStorage(SearchServiceConfiguration serviceConfiguration)
           
 
Method Summary
 org.apache.lucene.search.Query getConstrainQuery(org.xcmis.search.model.constraint.Constraint constraint, Map<String,Object> bindVariablesValues)
           
protected abstract  org.apache.lucene.index.IndexReader getIndexReader()
          Different lucene storage's should override this method.
protected abstract  Object save(LuceneIndexTransaction indexTransaction)
           
 Object visitExecuteSelectorCommand(InvocationContext ctx, ExecuteSelectorCommand command)
           
 Object visitModifyIndexCommand(InvocationContext ctx, ModifyIndexCommand command)
           
 
Methods inherited from class org.xcmis.search.content.interceptors.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext, start, stop
 
Methods inherited from class org.xcmis.search.content.interceptors.AbstractVisitor
visitChildEntriesCommand, visitGetContentEntryCommand, visitGetUnfiledEntriesCommand, visitProcessQueryCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_FETCH_SIZE

protected static final int MAX_FETCH_SIZE
The upper limit for the initial fetch size.

See Also:
Constant Field Values

nameConverter

protected final NameConverter nameConverter
Convert one Sting name to other String name.


pathSplitter

protected final PathSplitter pathSplitter
Split path string to names.


tableResolver

protected final VirtualTableResolver tableResolver
Reselve selector names to lucene querys.


nodeIndexer

protected LuceneIndexer nodeIndexer
Node indexer.


indexConfuguration

protected IndexConfiguration indexConfuguration
Index configuration.

Constructor Detail

AbstractLuceneQueryableIndexStorage

public AbstractLuceneQueryableIndexStorage(SearchServiceConfiguration serviceConfiguration)
                                    throws IndexException
Parameters:
serviceConfiguration -
Throws:
IndexException
IndexConfigurationException
IndexException
Method Detail

getConstrainQuery

public org.apache.lucene.search.Query getConstrainQuery(org.xcmis.search.model.constraint.Constraint constraint,
                                                        Map<String,Object> bindVariablesValues)
                                                 throws org.xcmis.search.VisitException,
                                                        IndexException
Throws:
org.xcmis.search.VisitException
IndexException

visitExecuteSelectorCommand

public Object visitExecuteSelectorCommand(InvocationContext ctx,
                                          ExecuteSelectorCommand command)
                                   throws Throwable
Specified by:
visitExecuteSelectorCommand in interface Visitor
Specified by:
visitExecuteSelectorCommand in class QueryableIndexStorage
Returns:
Throws:
Throwable
See Also:
QueryableIndexStorage.visitExecuteSelectorCommand(org.xcmis.search.content.command.InvocationContext, org.xcmis.search.content.command.query.ExecuteSelectorCommand)

visitModifyIndexCommand

public Object visitModifyIndexCommand(InvocationContext ctx,
                                      ModifyIndexCommand command)
                               throws Throwable
Specified by:
visitModifyIndexCommand in interface Visitor
Specified by:
visitModifyIndexCommand in class QueryableIndexStorage
Returns:
Throws:
Throwable
See Also:
QueryableIndexStorage.visitModifyIndexCommand(org.xcmis.search.content.command.InvocationContext, org.xcmis.search.content.command.index.ModifyIndexCommand)

getIndexReader

protected abstract org.apache.lucene.index.IndexReader getIndexReader()
                                                               throws IndexException
Different lucene storage's should override this method.

Throws:
IndexException

save

protected abstract Object save(LuceneIndexTransaction indexTransaction)
                        throws IndexException,
                               IndexTransactionException
Parameters:
indexTransaction -
Returns:
Throws:
IndexTransactionException
IndexException


Copyright © 2011 eXo Platform SAS. All Rights Reserved.