Interface LuceneIndex


  • public 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 Detail

      • getName

        java.lang.String getName()
        Returns the name of the LuceneIndex object. This name is provided while creating the LuceneIndex using LuceneService.createIndexFactory() create method
        Returns:
        Name of the LuceneIndex
      • getRegionPath

        java.lang.String getRegionPath()
        Returns the path of the region on which the LuceneIndex was created. The region name is provided while creating the LuceneIndex using LuceneService.createIndexFactory()
        Returns:
        Path of the region
      • getFieldNames

        java.lang.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 using LuceneService.createIndexFactory()
        Returns:
        String array containing the field names
      • getFieldAnalyzers

        java.util.Map<java.lang.String,​org.apache.lucene.analysis.Analyzer> getFieldAnalyzers()
        Returns a map containing the field name and the Analyzer used to tokenize the field. The analyzer to be used on a particular field is set in the addField method while creating the LuceneIndex using LuceneService.createIndexFactory()
        Returns:
        a map containing pairs of the indexed field name and the corresponding Analyzer being used on each indexed field.
      • isIndexingInProgress

        boolean isIndexingInProgress()
        Returns a boolean value to indicate if reindexing is in progress.
        Returns:
        a boolean value indicating indexing progress