blob: f2049fbf234bc6efffe56d19fe6658f2fc5e6dbd [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="`tantivy`"><meta name="keywords" content="rust, rustlang, rust-lang, tantivy"><title>tantivy - 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="../crates.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 crate"><!--[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="#">Crate tantivy</a></h2><div class="sidebar-elems"><ul class="block"><li class="version">Version 0.19.2</li><li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</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">Crate <a class="mod" href="#">tantivy</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/lib.rs.html#1-1177">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"><h2 id="tantivy"><a href="#tantivy"><code>tantivy</code></a></h2>
<p>Tantivy is a search engine library.
Think <code>Lucene</code>, but in Rust.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// First we need to define a schema ...
// `TEXT` means the field should be tokenized and indexed,
// along with its term frequency and term positions.
//
// `STORED` means that the field will also be saved
// in a compressed, row-oriented key-value store.
// This store is useful to reconstruct the
// documents that were selected during the search phase.
</span><span class="kw">let </span><span class="kw-2">mut </span>schema_builder = Schema::builder();
<span class="kw">let </span>title = schema_builder.add_text_field(<span class="string">&quot;title&quot;</span>, TEXT | STORED);
<span class="kw">let </span>body = schema_builder.add_text_field(<span class="string">&quot;body&quot;</span>, TEXT);
<span class="kw">let </span>schema = schema_builder.build();
<span class="comment">// Indexing documents
</span><span class="kw">let </span>index = Index::create_in_dir(index_path, schema.clone())<span class="question-mark">?</span>;
<span class="comment">// Here we use a buffer of 100MB that will be split
// between indexing threads.
</span><span class="kw">let </span><span class="kw-2">mut </span>index_writer = index.writer(<span class="number">100_000_000</span>)<span class="question-mark">?</span>;
<span class="comment">// Let&#39;s index one documents!
</span>index_writer.add_document(<span class="macro">doc!</span>(
title =&gt; <span class="string">&quot;The Old Man and the Sea&quot;</span>,
body =&gt; <span class="string">&quot;He was an old man who fished alone in a skiff in \
the Gulf Stream and he had gone eighty-four days \
now without taking a fish.&quot;
</span>))<span class="question-mark">?</span>;
<span class="comment">// We need to call .commit() explicitly to force the
// index_writer to finish processing the documents in the queue,
// flush the current index to the disk, and advertise
// the existence of new documents.
</span>index_writer.commit()<span class="question-mark">?</span>;
<span class="comment">// # Searching
</span><span class="kw">let </span>reader = index.reader()<span class="question-mark">?</span>;
<span class="kw">let </span>searcher = reader.searcher();
<span class="kw">let </span>query_parser = QueryParser::for_index(<span class="kw-2">&amp;</span>index, <span class="macro">vec!</span>[title, body]);
<span class="comment">// QueryParser may fail if the query is not in the right
// format. For user facing applications, this can be a problem.
// A ticket has been opened regarding this problem.
</span><span class="kw">let </span>query = query_parser.parse_query(<span class="string">&quot;sea whale&quot;</span>)<span class="question-mark">?</span>;
<span class="comment">// Perform search.
// `topdocs` contains the 10 most relevant doc ids, sorted by decreasing scores...
</span><span class="kw">let </span>top_docs: Vec&lt;(Score, DocAddress)&gt; =
searcher.search(<span class="kw-2">&amp;</span>query, <span class="kw-2">&amp;</span>TopDocs::with_limit(<span class="number">10</span>))<span class="question-mark">?</span>;
<span class="kw">for </span>(_score, doc_address) <span class="kw">in </span>top_docs {
<span class="comment">// Retrieve the actual content of documents given its `doc_address`.
</span><span class="kw">let </span>retrieved_doc = searcher.doc(doc_address)<span class="question-mark">?</span>;
<span class="macro">println!</span>(<span class="string">&quot;{}&quot;</span>, schema.to_json(<span class="kw-2">&amp;</span>retrieved_doc));
}
</code></pre></div>
<p>A good place for you to get started is to check out
the example code (
<a href="https://tantivy-search.github.io/examples/basic_search.html">literate programming</a> /
<a href="https://github.com/quickwit-oss/tantivy/blob/main/examples/basic_search.rs">source code</a>)</p>
</div></details><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2><div class="item-table"><div class="item-row"><div class="item-left import-item" id="reexport.time"><code>pub use <a class="mod" href="../time/index.html" title="mod time">time</a>;</code></div></div><div class="item-row"><div class="item-left import-item" id="reexport.TantivyError"><code>pub use crate::error::<a class="enum" href="error/enum.TantivyError.html" title="enum tantivy::error::TantivyError">TantivyError</a>;</code></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="aggregation/index.html" title="tantivy::aggregation mod">aggregation</a></div><div class="item-right docblock-short">Aggregations</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="collector/index.html" title="tantivy::collector mod">collector</a></div><div class="item-right docblock-short">Collectors</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="directory/index.html" title="tantivy::directory mod">directory</a></div><div class="item-right docblock-short">WORM (Write Once Read Many) directory abstraction.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="error/index.html" title="tantivy::error mod">error</a></div><div class="item-right docblock-short">Definition of Tantivy’s errors and results.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="fastfield/index.html" title="tantivy::fastfield mod">fastfield</a></div><div class="item-right docblock-short">Column oriented field storage for tantivy.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="fieldnorm/index.html" title="tantivy::fieldnorm mod">fieldnorm</a></div><div class="item-right docblock-short">The fieldnorm represents the length associated with
a given Field of a given document.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="merge_policy/index.html" title="tantivy::merge_policy mod">merge_policy</a></div><div class="item-right docblock-short">Defines tantivy’s merging strategy</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="positions/index.html" title="tantivy::positions mod">positions</a></div><div class="item-right docblock-short">Tantivy can (if instructed to do so in the schema) store the term positions in a given field.
This position is expressed as token ordinal. For instance,
In “The beauty and the beast”, the term “the” appears in position 0 and position 3.
This information is useful to run phrase queries.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="postings/index.html" title="tantivy::postings mod">postings</a></div><div class="item-right docblock-short">Postings module (also called inverted index)</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="query/index.html" title="tantivy::query mod">query</a></div><div class="item-right docblock-short">Module containing the different query implementations.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="schema/index.html" title="tantivy::schema mod">schema</a></div><div class="item-right docblock-short">Schema definition for tantivy’s indices.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="space_usage/index.html" title="tantivy::space_usage mod">space_usage</a></div><div class="item-right docblock-short">Representations for the space usage of various parts of a Tantivy index.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="store/index.html" title="tantivy::store mod">store</a></div><div class="item-right docblock-short">Compressed/slow/row-oriented storage for documents.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="termdict/index.html" title="tantivy::termdict mod">termdict</a></div><div class="item-right docblock-short">The term dictionary main role is to associate the sorted <a href="schema/struct.Term.html"><code>Term</code>s</a> to
a <a href="postings/struct.TermInfo.html"><code>TermInfo</code></a> struct that contains some meta-information
about the term.</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="tokenizer/index.html" title="tantivy::tokenizer mod">tokenizer</a></div><div class="item-right docblock-short">Tokenizer are in charge of chopping text into a stream of tokens
ready for indexing.</div></div></div><h2 id="macros" class="small-section-header"><a href="#macros">Macros</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="macro" href="macro.doc.html" title="tantivy::doc macro">doc</a></div><div class="item-right docblock-short"><code>doc!</code> is a shortcut that helps building <code>Document</code>
objects.</div></div></div><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.DateOptions.html" title="tantivy::DateOptions struct">DateOptions</a></div><div class="item-right docblock-short">Defines how DateTime field should be handled by tantivy.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DateTime.html" title="tantivy::DateTime struct">DateTime</a></div><div class="item-right docblock-short">A date/time value with microsecond precision.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DemuxMapping.html" title="tantivy::DemuxMapping struct">DemuxMapping</a></div><div class="item-right docblock-short">DemuxMapping can be used to reorganize data from multiple segments.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DocAddress.html" title="tantivy::DocAddress struct">DocAddress</a></div><div class="item-right docblock-short"><code>DocAddress</code> contains all the necessary information
to identify a document given a <code>Searcher</code> object.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DocIdToSegmentOrdinal.html" title="tantivy::DocIdToSegmentOrdinal struct">DocIdToSegmentOrdinal</a></div><div class="item-right docblock-short">DocIdToSegmentOrdinal maps from doc_id within a segment to the new segment ordinal for demuxing.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Document.html" title="tantivy::Document struct">Document</a></div><div class="item-right docblock-short">Tantivy’s Document is the object that can
be indexed and then searched for.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.FutureResult.html" title="tantivy::FutureResult struct">FutureResult</a></div><div class="item-right docblock-short"><code>FutureResult</code> is a handle that makes it possible to wait for the completion
of an ongoing task.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Index.html" title="tantivy::Index struct">Index</a></div><div class="item-right docblock-short">Search Index</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexBuilder.html" title="tantivy::IndexBuilder struct">IndexBuilder</a></div><div class="item-right docblock-short">IndexBuilder can be used to create an index.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexMeta.html" title="tantivy::IndexMeta struct">IndexMeta</a></div><div class="item-right docblock-short">Meta information about the <code>Index</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexReader.html" title="tantivy::IndexReader struct">IndexReader</a></div><div class="item-right docblock-short"><code>IndexReader</code> is your entry point to read and search the index.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexReaderBuilder.html" title="tantivy::IndexReaderBuilder struct">IndexReaderBuilder</a></div><div class="item-right docblock-short"><a href="struct.IndexReader.html" title="IndexReader"><code>IndexReader</code></a> builder</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexSettings.html" title="tantivy::IndexSettings struct">IndexSettings</a></div><div class="item-right docblock-short">Search Index Settings.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexSortByField.html" title="tantivy::IndexSortByField struct">IndexSortByField</a></div><div class="item-right docblock-short">Settings to presort the documents in an index</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.IndexWriter.html" title="tantivy::IndexWriter struct">IndexWriter</a></div><div class="item-right docblock-short"><code>IndexWriter</code> is the user entry-point to add document to an index.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Inventory.html" title="tantivy::Inventory struct">Inventory</a></div><div class="item-right docblock-short">The <code>Inventory</code> register and keeps track of all of the objects alive.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.InvertedIndexReader.html" title="tantivy::InvertedIndexReader struct">InvertedIndexReader</a></div><div class="item-right docblock-short">The inverted index reader is in charge of accessing
the inverted index associated with a specific field.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PreparedCommit.html" title="tantivy::PreparedCommit struct">PreparedCommit</a></div><div class="item-right docblock-short">A prepared commit</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Searcher.html" title="tantivy::Searcher struct">Searcher</a></div><div class="item-right docblock-short">Holds a list of <code>SegmentReader</code>s ready for search.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SearcherGeneration.html" title="tantivy::SearcherGeneration struct">SearcherGeneration</a></div><div class="item-right docblock-short">Identifies the searcher generation accessed by a <a href="struct.Searcher.html" title="Searcher"><code>Searcher</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Segment.html" title="tantivy::Segment struct">Segment</a></div><div class="item-right docblock-short">A segment is a piece of the index.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SegmentId.html" title="tantivy::SegmentId struct">SegmentId</a></div><div class="item-right docblock-short">Uuid identifying a segment.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SegmentMeta.html" title="tantivy::SegmentMeta struct">SegmentMeta</a></div><div class="item-right docblock-short"><code>SegmentMeta</code> contains simple meta information about a segment.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SegmentReader.html" title="tantivy::SegmentReader struct">SegmentReader</a></div><div class="item-right docblock-short">Entry point to access all of the datastructures of the <code>Segment</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Snippet.html" title="tantivy::Snippet struct">Snippet</a></div><div class="item-right docblock-short"><code>Snippet</code>
Contains a fragment of a document, and some highlighted parts inside it.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SnippetGenerator.html" title="tantivy::SnippetGenerator struct">SnippetGenerator</a></div><div class="item-right docblock-short"><code>SnippetGenerator</code></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Term.html" title="tantivy::Term struct">Term</a></div><div class="item-right docblock-short">Term represents the value that the token can take.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TrackedObject.html" title="tantivy::TrackedObject struct">TrackedObject</a></div><div class="item-right docblock-short">Your tracked object.</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Version.html" title="tantivy::Version struct">Version</a></div><div class="item-right docblock-short">Structure version for the index.</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.DatePrecision.html" title="tantivy::DatePrecision enum">DatePrecision</a></div><div class="item-right docblock-short">DateTime Precision</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Executor.html" title="tantivy::Executor enum">Executor</a></div><div class="item-right docblock-short">Search executor whether search request are single thread or multithread.</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Order.html" title="tantivy::Order enum">Order</a></div><div class="item-right docblock-short">The order to sort by</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ReloadPolicy.html" title="tantivy::ReloadPolicy enum">ReloadPolicy</a></div><div class="item-right docblock-short">Defines when a new version of the index should be reloaded.</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.SegmentComponent.html" title="tantivy::SegmentComponent enum">SegmentComponent</a></div><div class="item-right docblock-short">Enum describing each component of a tantivy segment.
Each component is stored in its own file,
using the pattern <code>segment_uuid</code>.<code>component_extension</code>,
except the delete component that takes an <code>segment_uuid</code>.<code>delete_opstamp</code>.<code>component_extension</code></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.UserOperation.html" title="tantivy::UserOperation enum">UserOperation</a></div><div class="item-right docblock-short">UserOperation is an enum type that encapsulates other operation types.</div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.TERMINATED.html" title="tantivy::TERMINATED constant">TERMINATED</a></div><div class="item-right docblock-short">Sentinel value returned when a <a href="trait.DocSet.html" title="DocSet"><code>DocSet</code></a> has been entirely consumed.</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.Directory.html" title="tantivy::Directory trait">Directory</a></div><div class="item-right docblock-short">Write-once read many (WORM) abstraction for where
tantivy’s data should be stored.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.DocSet.html" title="tantivy::DocSet trait">DocSet</a></div><div class="item-right docblock-short">Represents an iterable set of sorted doc ids.</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.HasLen.html" title="tantivy::HasLen trait">HasLen</a></div><div class="item-right docblock-short">Has length trait</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Postings.html" title="tantivy::Postings trait">Postings</a></div><div class="item-right docblock-short">Postings (also called inverted list)</div></div><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.Warmer.html" title="tantivy::Warmer trait">Warmer</a></div><div class="item-right docblock-short"><code>Warmer</code> can be used to maintain segment-level state e.g. caches.</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.demux.html" title="tantivy::demux fn">demux</a></div><div class="item-right docblock-short">Demux the segments according to <code>demux_mapping</code>. See <code>DemuxMapping</code>.
The number of output_directories need to match max new segment ordinal from <code>demux_mapping</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.f64_to_u64.html" title="tantivy::f64_to_u64 fn">f64_to_u64</a></div><div class="item-right docblock-short">Maps a <code>f64</code> to <code>u64</code></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.i64_to_u64.html" title="tantivy::i64_to_u64 fn">i64_to_u64</a></div><div class="item-right docblock-short">Maps a <code>i64</code> to <code>u64</code></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.u64_to_f64.html" title="tantivy::u64_to_f64 fn">u64_to_f64</a></div><div class="item-right docblock-short">Reverse the mapping given by <a href="fn.f64_to_u64.html" title="f64_to_u64()"><code>f64_to_u64()</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.u64_to_i64.html" title="tantivy::u64_to_i64 fn">u64_to_i64</a></div><div class="item-right docblock-short">Reverse the mapping given by <a href="fn.i64_to_u64.html" title="i64_to_u64()"><code>i64_to_u64()</code></a>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.version.html" title="tantivy::version fn">version</a></div><div class="item-right docblock-short">Expose the current version of tantivy as found in Cargo.toml during compilation.
eg. “0.11.0” as well as the compression scheme used in the docstore.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.version_string.html" title="tantivy::version_string fn">version_string</a></div><div class="item-right docblock-short">Exposes the complete version of tantivy as found in Cargo.toml during compilation as a string.
eg. “tantivy v0.11.0, index_format v1, store_compression: lz4”.</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="type" href="type.DocId.html" title="tantivy::DocId type">DocId</a></div><div class="item-right docblock-short">A <code>u32</code> identifying a document within a segment.
Documents have their <code>DocId</code> assigned incrementally,
as they are added in the segment.</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Opstamp.html" title="tantivy::Opstamp type">Opstamp</a></div><div class="item-right docblock-short">A u64 assigned to every operation incrementally</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Result.html" title="tantivy::Result type">Result</a></div><div class="item-right docblock-short">Tantivy result.</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.Score.html" title="tantivy::Score type">Score</a></div><div class="item-right docblock-short">A Score that represents the relevance of the document to the query</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.SegmentOrdinal.html" title="tantivy::SegmentOrdinal type">SegmentOrdinal</a></div><div class="item-right docblock-short">A <code>SegmentOrdinal</code> identifies a segment, within a <code>Searcher</code> or <code>Merger</code>.</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>