IndexField class

Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType.

Constructors

IndexField({required String indexFieldName, required IndexFieldType indexFieldType, LiteralOptions? literalOptions, List<SourceAttribute>? sourceAttributes, TextOptions? textOptions, UIntOptions? uIntOptions})
IndexField.fromXml(XmlElement elem)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
indexFieldName String
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
final
indexFieldType IndexFieldType
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
final
literalOptions LiteralOptions?
Options for literal field. Present if IndexFieldType specifies the field is of type literal.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceAttributes List<SourceAttribute>?
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
final
textOptions TextOptions?
Options for text field. Present if IndexFieldType specifies the field is of type text.
final
uIntOptions UIntOptions?
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
final

Methods

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

Operators

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