Module query

Source
Expand description

Module containing the different query implementations.

Structs§

AllQuery
Query that matches all of the documents.
AllScorer
Scorer associated with the AllQuery query.
AllWeight
Weight associated with the AllQuery query.
AutomatonWeight
A weight struct for Fuzzy Term and Regex Queries
BitSetDocSet
A BitSetDocSet makes it possible to iterate through a bitset as if it was a DocSet.
BooleanQuery
The boolean query returns a set of documents that matches the Boolean combination of constituent subqueries.
BoostQuery
BoostQuery is a wrapper over a query used to boost its score.
ConstScoreQuery
ConstScoreQuery is a wrapper over a query to provide a constant score. It can avoid unnecessary score computation on the wrapped query.
ConstScorer
Wraps a DocSet and simply returns a constant Scorer. The ConstScorer is useful if you have a DocSet where you needed a scorer.
DisjunctionMaxCombiner
Take max score of different scorers and optionally sum it with other matches multiplied by tie_breaker
DisjunctionMaxQuery
The disjunction max query returns documents matching one or more wrapped queries, called query clauses or clauses.
EmptyQuery
EmptyQuery is a dummy Query in which no document matches.
EmptyScorer
EmptyScorer is a dummy Scorer in which no document matches.
EmptyWeight
EmptyWeight is a dummy Weight in which no document matches.
Exclude
Filters a given DocSet by removing the docs from a given DocSet.
Explanation
Object describing the score of a given document. It is organized in trees.
FuzzyTermQuery
A Fuzzy Query matches all of the documents containing a specific term that is within Levenshtein distance
Intersection
Creates a DocSet that iterate through the intersection of two or more DocSets.
MoreLikeThisQuery
A query that matches all of the documents similar to a document or a set of field values provided.
MoreLikeThisQueryBuilder
The builder for more-like-this query
PhraseQuery
PhraseQuery matches a specific sequence of words.
QueryParser
Tantivy’s Query parser
RangeQuery
RangeQuery matches all documents that have at least one term within a defined range.
RegexQuery
A Regex Query matches all of the documents containing a specific term that matches a regex pattern.
RequiredOptionalScorer
Given a required scorer and an optional scorer matches all document from the required scorer and complements the score using the optional scorer.
SumCombiner
Sums the score of different scorers.
SumWithCoordsCombiner
Sums the score of different scorers and keeps the count of scorers which matched.
TermQuery
A Term query matches all of the documents containing a specific term.
TermSetQuery
A Term Set Query matches all of the documents containing any of the Term provided
Union
Creates a DocSet that iterate through the union of two or more DocSets.

Enums§

EnableScoring
Argument used in Query::weight(..)
Occur
Defines whether a term in a query must be present, should be present or must not be present.
QueryParserError
Possible error that may happen when parsing a query.

Traits§

Query
The Query trait defines a set of documents and a scoring method for those documents.
QueryClone
Implements box_clone.
ScoreCombiner
The ScoreCombiner trait defines how to compute an overall score given a list of scores.
Scorer
Scored set of documents matching a query within a specific segment.
Weight
A Weight is the specialization of a Query for a given set of segments.

Functions§

intersect_scorers
Returns the intersection scorer.