Package org.dizitart.no2.index
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dropIndex(IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
Drops the index from the collection.LinkedHashSet<NitriteId>
findByFilter(FindPlan findPlan, NitriteConfig nitriteConfig)
Finds the NitriteIds of the documents that match the given filter in the specified collection.String
getIndexType()
Gets the index type.void
removeIndexEntry(FieldValues fieldValues, IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
Removes an index entry for the given field values and index descriptor from the Nitrite database.void
validateIndex(Fields fields)
Validates the given fields for indexing.void
writeIndexEntry(FieldValues fieldValues, IndexDescriptor indexDescriptor, NitriteConfig nitriteConfig)
Writes an index entry for the given field values and index descriptor.-
Methods inherited from interface org.dizitart.no2.common.module.NitritePlugin
close, initialize
-
-
-
-
Method Detail
-
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 indexedindexDescriptor
- the descriptor of the indexnitriteConfig
- 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 forindexDescriptor
- the index descriptor for the index entry to removenitriteConfig
- 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.
-
-