|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.indexmanagement.lucenewrapper.LuceneSearcher
public class LuceneSearcher
An IndexSerch implementation used to search a Lucene index.
| Nested Class Summary | |
|---|---|
static class |
LuceneSearcher.SupportedRelations
|
| Field Summary | |
|---|---|
static String |
ALL_INDEXES
|
static String |
EQUALS
|
ArrayList<String> |
fieldNames
|
| Constructor Summary | |
|---|---|
LuceneSearcher()
|
|
LuceneSearcher(String lemmatizerPluginName,
String configFilePath,
Language defaultLanguage)
constructor |
|
| 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)
Deprecated. - This method applies a query expansion, before executing the query, that assumes an old Index version was used (Index Library version < 3.0.0) Fills the RSClient with results from executing the queryString on an index (Lucene only). Setting client to null will print results to system.out. |
String |
expandQuery(String query,
String defaultLemLang,
String defaultLang,
boolean onlyLemByDefault)
|
void |
openIndex(String indexDir,
String indexName)
Opens the index for search operations |
void |
setIndexType(FullTextIndexType idxType)
Updates the IndexSearch' state object |
void |
setMaximumSnippetsCount(Integer maximumSnippetsCount)
|
void |
setSnippetSize(Integer snippetSize)
|
void |
updateIndex()
Updates the index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EQUALS
public static final String ALL_INDEXES
public ArrayList<String> fieldNames
| Constructor Detail |
|---|
public LuceneSearcher(String lemmatizerPluginName,
String configFilePath,
Language defaultLanguage)
throws Exception
Exception
public LuceneSearcher()
throws Exception
Exception| Method Detail |
|---|
public void setSnippetSize(Integer snippetSize)
public void setMaximumSnippetsCount(Integer maximumSnippetsCount)
public void openIndex(String indexDir,
String indexName)
throws IndexException
openIndex in interface IndexSearchindexDir - the base directory where indices are storedindexName - name of the index
IndexException - -
an error opening the index
public void updateIndex()
throws IndexException
updateIndex in interface IndexSearchIndexException - -
an error updating the index
public void setIndexType(FullTextIndexType idxType)
throws IndexException
setIndexType in interface IndexSearchIndexException - -
an error setting the IndexType
public void closeIndex()
throws IndexException
closeIndex in interface IndexSearchIndexException - -
an error closing the index
public URI executeCqlQuery(ArrayList<String> presentable,
ArrayList<String> searchable,
String queryString,
boolean isComplete,
RRadaptor adaptor)
throws Exception
Setting client to null will print results to system.out.
executeCqlQuery in interface IndexSearchpresentable - the field Names of the fields that are presentable in this indexsearchable - the field Names of the fields that are searchable in this indexqueryString - executed query stringisComplete - indicates if the results must contain the full payload
IndexException - -
an error executing the query
Exception
public URI executeQuery(String queryString,
boolean isComplete)
throws IndexException
Setting client to null will print results to system.out.
IndexSearchSetting client to null will print results to system.out.
executeQuery in interface IndexSearchqueryString - executed query stringisComplete - indicates if the results must contain the full payload
IndexException - -
an error executing the query
public String expandQuery(String query,
String defaultLemLang,
String defaultLang,
boolean onlyLemByDefault)
throws IndexException
IndexException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||