org.apache.geode.cache.lucene

## 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 Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,Analyzer>` | `getFieldAnalyzers()` Returns a map containing the field name and the `Analyzer` used to tokenize the field.
    `java.lang.String[]` | `getFieldNames()` Returns a string array containing the fields on which the LuceneIndex was created.
    `LuceneSerializer` | `getLuceneSerializer()` Return the `LuceneSerializer` associated with this index
    `java.lang.String` | `getName()` Returns the name of the LuceneIndex object.
    `java.lang.String` | `getRegionPath()` Returns the path of the region on which the LuceneIndex was created.

- - ### 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,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.

    - #### getLuceneSerializer

          LuceneSerializer getLuceneSerializer()

      Return the `LuceneSerializer` associated with this index