org.gcube.indexmanagement.common
Interface IndexSearch

All Known Implementing Classes:
LuceneSearcher

public interface IndexSearch

Interface for Index Searching Wrapper Classes


Method Summary
 void closeIndex()
          Closes the previously opened index
 URI executeCqlQuery(ArrayList<String> presentable, ArrayList<String> searchable, String queryString, boolean isComplete, RRadaptor adaptor)
          Fills the RSClient with results from executing the queryString on an index (Lucene only).
 URI executeQuery(String queryString, boolean isComplete)
          Fills the RSClient with results from executing the queryString on an index (Lucene only).
 void openIndex(String indexDir, String indexName)
          Opens the index for search operations
 void setIndexType(FullTextIndexType idxType)
          Updates the IndexSearch' state object
 void updateIndex()
          Updates the index.
 

Method Detail

openIndex

void openIndex(String indexDir,
               String indexName)
               throws IndexException
Opens the index for search operations

Parameters:
indexDir - the base directory where indices are stored
indexName - name of the index
Throws:
IndexException - - an error opening the index

updateIndex

void updateIndex()
                 throws IndexException
Updates the index.

Throws:
IndexException - - an error updating the index

closeIndex

void closeIndex()
                throws IndexException
Closes the previously opened index

Throws:
IndexException - - an error closing the index

setIndexType

void setIndexType(FullTextIndexType idxType)
                  throws IndexException
Updates the IndexSearch' state object

Throws:
IndexException - - an error setting the IndexType

executeQuery

URI executeQuery(String queryString,
                 boolean isComplete)
                 throws IndexException
Fills the RSClient with results from executing the queryString on an index (Lucene only).

Setting client to null will print results to system.out.

Parameters:
queryString - executed query string
isComplete - indicates if the results must contain the full payload
Returns:
number of hits in index (may differe from records in resultset).
Throws:
IndexException - - an error executing the query

executeCqlQuery

URI executeCqlQuery(ArrayList<String> presentable,
                    ArrayList<String> searchable,
                    String queryString,
                    boolean isComplete,
                    RRadaptor adaptor)
                    throws Exception
Fills the RSClient with results from executing the queryString on an index (Lucene only).

Setting client to null will print results to system.out.

Parameters:
presentable - the field Names of the fields that are presentable in this index
searchable - the field Names of the fields that are searchable in this index
queryString - executed query string
isComplete - indicates if the results must contain the full payload
Returns:
number of hits in index (may differe from records in resultset).
Throws:
IndexException - - an error executing the query
Exception


Copyright © 2012. All Rights Reserved.