#[non_exhaustive]#[repr(u32)]pub enum Operator {
Show 17 variants
And = 0,
Or,
AndNot,
XOr,
AndMaybe,
Filter,
Near,
Phrase,
ValueRange,
ScaleWeight,
EliteSet,
ValueGe,
ValueLe,
Synonym,
Max,
Wildcard,
Invalid = 99,
}
Expand description
An Operator
can be used to compose queries in novel ways
See upstream docs for details such as implications on document weighting, etc
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
And = 0
Only matches documents which match all subqueries
Or
Matches documents which match at least one subquery
AndNot
Matches documents which matches only the first subquery
XOr
Matches documents which match an odd number of subqueries
AndMaybe
Matches documents which match the first subquery, and takes extra weight from the remaining subqueries
Filter
Similar to [And
], but weight is only taken from the first subquery (often used with
boolean terms)
Near
Matches documents where all subqueries match and are near one another
Phrase
Matches documents where subqueries match, are near one another and in order
ValueRange
Matches documents with a value slot in the given range
ScaleWeight
Scales the weight contributed by a subquery
EliteSet
Picks the best N subqueries, and combines them with an [Or
]
ValueGe
Matches documents with a value slot greater than or equal to the given value
ValueLe
Matches documents with a value slot less than or equal to the given value
Synonym
Matches documents which match any of the subqueries, but weights them as if they were a single term
Max
Sets the maximum weight of any subquery
Wildcard
Enables wildcard expansion on subqueries
Invalid = 99
Represents an invalid query