Index class

Represents an index in a collection.

This class holds information about an index defined for a specific field in a collection. An index is a data structure that improves the speed of data retrieval operations by efficiently mapping the field's values to their corresponding document identifiers.

Annotations
  • @JsonSerializable()

Constructors

Index({required String fieldName, required String indexName, required String metricType})
Creates a new instance of Index.
Index.fromJson(Map<String, dynamic> json)
Creates a new Index instance from a JSON map.
factory

Properties

fieldName String
The name of the field on which the index is defined.
final
hashCode int
The hash code for this object.
no setterinherited
indexName String
The name of the index.
final
metricType String
The type of the metric used for similarity calculations.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this Index instance to a JSON map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited