KNearestFilter class

Internal index-scan marker for a K-nearest query. The actual K selection is performed by the spatial index (it queries the R-tree's nearest-neighbour search), so this filter just carries the query parameters.

Inheritance

Constructors

KNearestFilter(String field, Coordinate center, int k, {double? maxDistance})

Properties

center → Coordinate
final
collectionName String?
Gets the name of the collection on which this filter is applied.
getter/setter pairinherited
comparable Comparable
no setterinherited
field String
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
k int
final
maxDistance double?
final
nitriteConfig ↔ NitriteConfig?
Gets the NitriteConfig instance.
getter/setter pairinherited
objectFilter bool
Indicates if this filter is an object filter.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → Geometry
Gets the value of the filter.
no setterinherited

Methods

and(Filter filter) → Filter
Creates an and filter which performs a logical AND operation on two filters and selects the documents that satisfy both filters.
inherited
apply(Document doc) bool
Applies the filter to the given element.
inherited
applyOnIndex(IndexMap indexMap) Stream
Apply this filter on a nitrite index.
canBeGrouped(IndexOnlyFilter other) bool
Checks if other filter can be grouped together with this filter.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() → Filter
Creates a not filter which performs a logical NOT operation on a filter and selects the documents that do not satisfy the criteria.
inherited
or(Filter filter) → Filter
Creates an or filter which performs a logical OR operation on two filters and selects the documents that satisfy at least one of the filter.
inherited
supportedIndexType() String
Gets the supported index type for this filter.
inherited
toString() String
A string representation of this object.
override
validateSearchTerm(NitriteMapper nitriteMapper, String field, dynamic value) → void
Validates the search term for a given field and value.
inherited
yieldValues(dynamic value) Stream
Yield values after index scanning.
inherited

Operators

operator &(Filter other) → Filter
Creates an and filter which performs a logical AND operation on two filters and selects the documents that satisfy both filters.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator |(Filter other) → Filter
Creates an or filter which performs a logical OR operation on two filters and selects the documents that satisfy at least one of the filter.
inherited
operator ~() → Filter
Creates a not filter which performs a logical NOT operation on a filter and selects the documents that do not satisfy the criteria.
inherited