Interface NitriteIndexer

All Superinterfaces:
AutoCloseable, NitritePlugin

public interface NitriteIndexer extends NitritePlugin
An abstract class representing a Nitrite indexer plugin.

NitriteIndexer extends NitritePlugin and provides a base class for all Nitrite indexer plugins. It defines the basic structure and functionality of an indexer plugin that can be used to index Nitrite collections.

Since:
4.0
Author:
Anindya Chatterjee.
  • Method Details

    • getIndexType

      String getIndexType()
      Gets the index type.
      Returns:
      the index type
    • validateIndex

      void validateIndex(Fields fields)
      Validates the given fields for indexing.
      Parameters:
      fields - the fields to be validated
    • dropIndex

      void dropIndex(IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
      Drops the index from the collection.
      Parameters:
      indexDescriptor - the descriptor of the index to be dropped.
      nitriteConfig - the Nitrite configuration object.
    • writeIndexEntry

      void writeIndexEntry(FieldValues fieldValues, IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
      Writes an index entry for the given field values and index descriptor.
      Parameters:
      fieldValues - the field values to be indexed
      indexDescriptor - the descriptor of the index
      nitriteConfig - the NitriteConfig to use for indexing
    • removeIndexEntry

      void removeIndexEntry(FieldValues fieldValues, IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
      Removes an index entry for the given field values and index descriptor from the Nitrite database.
      Parameters:
      fieldValues - the field values to remove the index entry for
      indexDescriptor - the index descriptor for the index entry to remove
      nitriteConfig - the Nitrite configuration object
    • findByFilter

      LinkedHashSet<NitriteId> findByFilter(FindPlan findPlan, NitriteConfig nitriteConfig)
      Finds the NitriteIds of the documents that match the given filter in the specified collection.
      Parameters:
      findPlan - the plan for finding the documents.
      nitriteConfig - the Nitrite configuration.
      Returns:
      a set of NitriteIds of the documents that match the given filter.