Interface LuceneIndex
LuceneIndex represents the Lucene index created over the data stored in Apache Geode regions. The
Lucene indexes are maintained automatically by Apache Geode whenever the entries are updated in
the associated regions. Lucene Indexes are created using LuceneService.createIndexFactory()
by specifying the Lucene index name, the region associated with the Lucene index and the fields
on which the Lucene index is to be created.
Every Lucene index is uniquely identified by the index name and the name of the region associated
with it. To obtain the LuceneIndex created over a region use
LuceneService.getIndex(String, String)
LuceneIndexes are created using gfsh, xml, or the Java API using LuceneService
LuceneService.createIndexFactory(). More information about LuceneIndex can be found at
LuceneService
-
Method Summary
Modifier and TypeMethodDescriptionReturns a map containing the field name and theAnalyzerused to tokenize the field.String[]Returns a string array containing the fields on which the LuceneIndex was created.Return theLuceneSerializerassociated with this indexgetName()Returns the name of the LuceneIndex object.Returns the path of the region on which the LuceneIndex was created.booleanReturns a boolean value to indicate if reindexing is in progress.
-
Method Details
-
getName
String getName()Returns the name of the LuceneIndex object. This name is provided while creating the LuceneIndex usingLuceneService.createIndexFactory()create method- Returns:
- Name of the LuceneIndex
-
getRegionPath
String getRegionPath()Returns the path of the region on which the LuceneIndex was created. The region name is provided while creating the LuceneIndex usingLuceneService.createIndexFactory()- Returns:
- Path of the region
-
getFieldNames
String[] getFieldNames()Returns a string array containing the fields on which the LuceneIndex was created. These fields are assigned using the addField method while creating the LuceneIndex usingLuceneService.createIndexFactory()- Returns:
- String array containing the field names
-
getFieldAnalyzers
Returns a map containing the field name and theAnalyzerused to tokenize the field. The analyzer to be used on a particular field is set in the addField method while creating the LuceneIndex usingLuceneService.createIndexFactory()- Returns:
- a map containing pairs of the indexed field name and the corresponding
Analyzerbeing used on each indexed field.
-
getLuceneSerializer
LuceneSerializer getLuceneSerializer()Return theLuceneSerializerassociated with this index- Returns:
- the
LuceneSerializerassociated with this index
-
isIndexingInProgress
boolean isIndexingInProgress()Returns a boolean value to indicate if reindexing is in progress.- Returns:
- a boolean value indicating indexing progress
-