blob: fd5311f4a3edf1c2a0cb36de38eb1c461e140eea [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Module containing the different query implementations."><meta name="keywords" content="rust, rustlang, rust-lang, query"><title>tantivy::query - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../tantivy/index.html"><div class="logo-container"><img src="http://fulmicoton.com/tantivy-logo/tantivy-logo.png" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../tantivy/index.html"><div class="logo-container">
<img src="http://fulmicoton.com/tantivy-logo/tantivy-logo.png" alt="logo"></div></a><h2 class="location"><a href="#">Module query</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">tantivy</a>::<wbr><a class="mod" href="#">query</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/tantivy/query/mod.rs.html#1-114">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Module containing the different query implementations.</p>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.AllQuery.html" title="tantivy::query::AllQuery struct">AllQuery</a></div><div class="item-right docblock-short">Query that matches all of the documents.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.AllScorer.html" title="tantivy::query::AllScorer struct">AllScorer</a></div><div class="item-right docblock-short">Scorer associated with the <code>AllQuery</code> query.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.AllWeight.html" title="tantivy::query::AllWeight struct">AllWeight</a></div><div class="item-right docblock-short">Weight associated with the <code>AllQuery</code> query.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.AutomatonWeight.html" title="tantivy::query::AutomatonWeight struct">AutomatonWeight</a></div><div class="item-right docblock-short">A weight struct for Fuzzy Term and Regex Queries</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BitSetDocSet.html" title="tantivy::query::BitSetDocSet struct">BitSetDocSet</a></div><div class="item-right docblock-short">A <code>BitSetDocSet</code> makes it possible to iterate through a bitset as if it was a <code>DocSet</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BooleanQuery.html" title="tantivy::query::BooleanQuery struct">BooleanQuery</a></div><div class="item-right docblock-short">The boolean query returns a set of documents
that matches the Boolean combination of constituent subqueries.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BoostQuery.html" title="tantivy::query::BoostQuery struct">BoostQuery</a></div><div class="item-right docblock-short"><code>BoostQuery</code> is a wrapper over a query used to boost its score.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ConstScoreQuery.html" title="tantivy::query::ConstScoreQuery struct">ConstScoreQuery</a></div><div class="item-right docblock-short"><code>ConstScoreQuery</code> is a wrapper over a query to provide a constant score.
It can avoid unnecessary score computation on the wrapped query.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ConstScorer.html" title="tantivy::query::ConstScorer struct">ConstScorer</a></div><div class="item-right docblock-short">Wraps a <code>DocSet</code> and simply returns a constant <code>Scorer</code>.
The <code>ConstScorer</code> is useful if you have a <code>DocSet</code> where
you needed a scorer.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DisjunctionMaxCombiner.html" title="tantivy::query::DisjunctionMaxCombiner struct">DisjunctionMaxCombiner</a></div><div class="item-right docblock-short">Take max score of different scorers
and optionally sum it with other matches multiplied by <code>tie_breaker</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DisjunctionMaxQuery.html" title="tantivy::query::DisjunctionMaxQuery struct">DisjunctionMaxQuery</a></div><div class="item-right docblock-short">The disjunction max query кeturns documents matching one or more wrapped queries,
called query clauses or clauses.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.EmptyQuery.html" title="tantivy::query::EmptyQuery struct">EmptyQuery</a></div><div class="item-right docblock-short"><code>EmptyQuery</code> is a dummy <code>Query</code> in which no document matches.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.EmptyScorer.html" title="tantivy::query::EmptyScorer struct">EmptyScorer</a></div><div class="item-right docblock-short"><code>EmptyScorer</code> is a dummy <code>Scorer</code> in which no document matches.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.EmptyWeight.html" title="tantivy::query::EmptyWeight struct">EmptyWeight</a></div><div class="item-right docblock-short"><code>EmptyWeight</code> is a dummy <code>Weight</code> in which no document matches.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Exclude.html" title="tantivy::query::Exclude struct">Exclude</a></div><div class="item-right docblock-short">Filters a given <code>DocSet</code> by removing the docs from a given <code>DocSet</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Explanation.html" title="tantivy::query::Explanation struct">Explanation</a></div><div class="item-right docblock-short">Object describing the score of a given document.
It is organized in trees.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.FuzzyTermQuery.html" title="tantivy::query::FuzzyTermQuery struct">FuzzyTermQuery</a></div><div class="item-right docblock-short">A Fuzzy Query matches all of the documents
containing a specific term that is within
Levenshtein distance</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Intersection.html" title="tantivy::query::Intersection struct">Intersection</a></div><div class="item-right docblock-short">Creates a <code>DocSet</code> that iterate through the intersection of two or more <code>DocSet</code>s.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MoreLikeThisQuery.html" title="tantivy::query::MoreLikeThisQuery struct">MoreLikeThisQuery</a></div><div class="item-right docblock-short">A query that matches all of the documents similar to a document
or a set of field values provided.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.MoreLikeThisQueryBuilder.html" title="tantivy::query::MoreLikeThisQueryBuilder struct">MoreLikeThisQueryBuilder</a></div><div class="item-right docblock-short">The builder for more-like-this query</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PhraseQuery.html" title="tantivy::query::PhraseQuery struct">PhraseQuery</a></div><div class="item-right docblock-short"><code>PhraseQuery</code> matches a specific sequence of words.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.QueryParser.html" title="tantivy::query::QueryParser struct">QueryParser</a></div><div class="item-right docblock-short">Tantivy’s Query parser</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RangeQuery.html" title="tantivy::query::RangeQuery struct">RangeQuery</a></div><div class="item-right docblock-short"><code>RangeQuery</code> matches all documents that have at least one term within a defined range.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RegexQuery.html" title="tantivy::query::RegexQuery struct">RegexQuery</a></div><div class="item-right docblock-short">A Regex Query matches all of the documents
containing a specific term that matches
a regex pattern.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RequiredOptionalScorer.html" title="tantivy::query::RequiredOptionalScorer struct">RequiredOptionalScorer</a></div><div class="item-right docblock-short">Given a required scorer and an optional scorer
matches all document from the required scorer
and complements the score using the optional scorer.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SumCombiner.html" title="tantivy::query::SumCombiner struct">SumCombiner</a></div><div class="item-right docblock-short">Sums the score of different scorers.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SumWithCoordsCombiner.html" title="tantivy::query::SumWithCoordsCombiner struct">SumWithCoordsCombiner</a></div><div class="item-right docblock-short">Sums the score of different scorers and keeps the count
of scorers which matched.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TermQuery.html" title="tantivy::query::TermQuery struct">TermQuery</a></div><div class="item-right docblock-short">A Term query matches all of the documents
containing a specific term.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TermSetQuery.html" title="tantivy::query::TermSetQuery struct">TermSetQuery</a></div><div class="item-right docblock-short">A Term Set Query matches all of the documents containing any of the Term provided</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Union.html" title="tantivy::query::Union struct">Union</a></div><div class="item-right docblock-short">Creates a <code>DocSet</code> that iterate through the union of two or more <code>DocSet</code>s.</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.EnableScoring.html" title="tantivy::query::EnableScoring enum">EnableScoring</a></div><div class="item-right docblock-short">Argument used in <code>Query::weight(..)</code></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Occur.html" title="tantivy::query::Occur enum">Occur</a></div><div class="item-right docblock-short">Defines whether a term in a query must be present,
should be present or must not be present.</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.QueryParserError.html" title="tantivy::query::QueryParserError enum">QueryParserError</a></div><div class="item-right docblock-short">Possible error that may happen when parsing a query.</div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Query.html" title="tantivy::query::Query trait">Query</a></div><div class="item-right docblock-short">The <code>Query</code> trait defines a set of documents and a scoring method
for those documents.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.QueryClone.html" title="tantivy::query::QueryClone trait">QueryClone</a></div><div class="item-right docblock-short">Implements <code>box_clone</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.ScoreCombiner.html" title="tantivy::query::ScoreCombiner trait">ScoreCombiner</a></div><div class="item-right docblock-short">The <code>ScoreCombiner</code> trait defines how to compute
an overall score given a list of scores.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Scorer.html" title="tantivy::query::Scorer trait">Scorer</a></div><div class="item-right docblock-short">Scored set of documents matching a query within a specific segment.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Weight.html" title="tantivy::query::Weight trait">Weight</a></div><div class="item-right docblock-short">A Weight is the specialization of a <code>Query</code>
for a given set of segments.</div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.intersect_scorers.html" title="tantivy::query::intersect_scorers fn">intersect_scorers</a></div><div class="item-right docblock-short">Returns the intersection scorer.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="tantivy" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>