Module query

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.
Bm25Weight
A struct used for computing BM25 scores.
BooleanQuery
The boolean query returns a set of documents that matches the Boolean combination of constituent subqueries.
BooleanWeight
Weight associated to the BoolQuery.
BoostQuery
BoostQuery is a wrapper over a query used to boost its score.
BoostWeight
Weight associated to the BoostQuery.
BoundsRange
BufferedUnionScorer
Creates a DocSet that iterate through the union of two or more DocSets.
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.
ExistsQuery
Query that matches all documents with a non-null value in the specified field.
Explanation
Object describing the score of a given document. It is organized in trees.
FastFieldRangeQuery
FastFieldRangeQuery is the same as [RangeQuery] but only uses the fast field
FastFieldRangeWeight
FastFieldRangeWeight uses the fast field to execute range queries.
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.
InvertedIndexRangeQuery
InvertedIndexRangeQuery is the same as RangeQuery but only uses the inverted index
InvertedIndexRangeWeight
Range weight on the inverted index
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
PhrasePrefixQuery
PhrasePrefixQuery matches a specific sequence of words followed by term of which only a prefix is known.
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.
RegexPhraseQuery
RegexPhraseQuery matches a specific sequence of regex queries.
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.
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

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§

Bm25StatisticsProvider
An interface to compute the statistics needed in BM25 scoring.
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.
wildcard_query_to_regex_str
Transform a wildcard query to a regex string.