mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-25 12:40:41 +00:00
Automatic Travis documentation build
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -174,6 +174,8 @@
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
</pre><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="prelude-ty">Result</span>;
|
||||
<span class="kw">use</span> <span class="ident">core</span>::<span class="ident">SegmentReader</span>;
|
||||
@@ -200,7 +202,8 @@
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Searcher</span> {
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="doccomment">/// Creates a new `Searcher`</span>
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">new</span>(
|
||||
<span class="ident">schema</span>: <span class="ident">Schema</span>,
|
||||
<span class="ident">segment_readers</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">SegmentReader</span><span class="op">></span>) <span class="op">-></span> <span class="ident">Searcher</span> {
|
||||
<span class="ident">Searcher</span> {
|
||||
@@ -218,6 +221,7 @@
|
||||
<span class="ident">segment_reader</span>.<span class="ident">doc</span>(<span class="ident">doc_id</span>)
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Access the schema associated to the index of this searcher.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">schema</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="kw-2">&</span><span class="ident">Schema</span> {
|
||||
<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">schema</span>
|
||||
}
|
||||
|
||||
@@ -166,16 +166,74 @@
|
||||
<span id="109">109</span>
|
||||
<span id="110">110</span>
|
||||
<span id="111">111</span>
|
||||
<span id="112">112</span>
|
||||
<span id="113">113</span>
|
||||
<span id="114">114</span>
|
||||
<span id="115">115</span>
|
||||
<span id="116">116</span>
|
||||
<span id="117">117</span>
|
||||
<span id="118">118</span>
|
||||
<span id="119">119</span>
|
||||
<span id="120">120</span>
|
||||
<span id="121">121</span>
|
||||
<span id="122">122</span>
|
||||
<span id="123">123</span>
|
||||
<span id="124">124</span>
|
||||
<span id="125">125</span>
|
||||
<span id="126">126</span>
|
||||
<span id="127">127</span>
|
||||
<span id="128">128</span>
|
||||
<span id="129">129</span>
|
||||
<span id="130">130</span>
|
||||
<span id="131">131</span>
|
||||
<span id="132">132</span>
|
||||
<span id="133">133</span>
|
||||
<span id="134">134</span>
|
||||
<span id="135">135</span>
|
||||
<span id="136">136</span>
|
||||
<span id="137">137</span>
|
||||
<span id="138">138</span>
|
||||
<span id="139">139</span>
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
<span id="143">143</span>
|
||||
<span id="144">144</span>
|
||||
<span id="145">145</span>
|
||||
<span id="146">146</span>
|
||||
<span id="147">147</span>
|
||||
</pre><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">fastfield</span>::<span class="ident">FastFieldSerializer</span>;
|
||||
<span class="kw">use</span> <span class="ident">fastfield</span>::<span class="ident">serializer</span>::<span class="ident">FastSingleFieldSerializer</span>;
|
||||
<span class="kw">use</span> <span class="ident">fastfield</span>::<span class="ident">value_to_u64</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
|
||||
<span class="kw">use</span> <span class="ident">DocId</span>;
|
||||
<span class="kw">use</span> <span class="ident">postings</span>::<span class="ident">UnorderedTermId</span>;
|
||||
<span class="kw">use</span> <span class="ident">schema</span>::{<span class="ident">Document</span>, <span class="ident">Field</span>};
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
|
||||
<span class="kw">use</span> <span class="ident">itertools</span>::<span class="ident">Itertools</span>;
|
||||
|
||||
<span class="doccomment">/// Writer for multi-valued (as in, more than one value per document)</span>
|
||||
<span class="doccomment">/// int fast field.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// This `Writer` is only useful for advanced user.</span>
|
||||
<span class="doccomment">/// The normal way to get your multivalued int in your index</span>
|
||||
<span class="doccomment">/// is to</span>
|
||||
<span class="doccomment">/// - declare your field with fast set to `Cardinality::MultiValues`</span>
|
||||
<span class="doccomment">/// in your schema</span>
|
||||
<span class="doccomment">/// - add your document simply by calling `.add_document(...)`.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// The `MultiValueIntFastFieldWriter` can be acquired from the</span>
|
||||
<span class="doccomment">/// fastfield writer, by calling [`.get_multivalue_writer(...)`](./struct.FastFieldsWriter.html#method.get_multivalue_writer).</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// Once acquired, writing is done by calling calls to</span>
|
||||
<span class="doccomment">/// `.add_document_vals(&[u64])` once per document.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// The serializer makes it possible to remap all of the values</span>
|
||||
<span class="doccomment">/// that were pushed to the writer using a mapping.</span>
|
||||
<span class="doccomment">/// This makes it possible to push unordered term ids,</span>
|
||||
<span class="doccomment">/// during indexing and remap them to their respective</span>
|
||||
<span class="doccomment">/// term ids when the segment is getting serialized.</span>
|
||||
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">MultiValueIntFastFieldWriter</span> {
|
||||
<span class="ident">field</span>: <span class="ident">Field</span>,
|
||||
<span class="ident">vals</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">u64</span><span class="op">></span>,
|
||||
@@ -184,8 +242,9 @@
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">MultiValueIntFastFieldWriter</span> {
|
||||
|
||||
<span class="doccomment">/// Creates a new `IntFastFieldWriter`</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">field</span>: <span class="ident">Field</span>, <span class="ident">is_facet</span>: <span class="ident">bool</span>) <span class="op">-></span> <span class="self">Self</span> {
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">field</span>: <span class="ident">Field</span>, <span class="ident">is_facet</span>: <span class="ident">bool</span>) <span class="op">-></span> <span class="self">Self</span> {
|
||||
<span class="ident">MultiValueIntFastFieldWriter</span> {
|
||||
<span class="ident">field</span>,
|
||||
<span class="ident">vals</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
|
||||
@@ -194,25 +253,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Access the field associated to the `MultiValueIntFastFieldWriter`</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">field</span>(<span class="kw-2">&</span><span class="self">self</span>) <span class="op">-></span> <span class="ident">Field</span> {
|
||||
<span class="self">self</span>.<span class="ident">field</span>
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">next_doc</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
||||
<span class="doccomment">/// Finalize the current document.</span>
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">next_doc</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>) {
|
||||
<span class="self">self</span>.<span class="ident">doc_index</span>.<span class="ident">push</span>(<span class="self">self</span>.<span class="ident">vals</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">u64</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Records a new value.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// The n-th value being recorded is implicitely</span>
|
||||
<span class="doccomment">/// associated to the document with the `DocId` n.</span>
|
||||
<span class="doccomment">/// (Well, `n-1` actually because of 0-indexing)</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_val</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">val</span>: <span class="ident">UnorderedTermId</span>) {
|
||||
<span class="doccomment">/// Pushes a new value to the current document.</span>
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">add_val</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">val</span>: <span class="ident">UnorderedTermId</span>) {
|
||||
<span class="self">self</span>.<span class="ident">vals</span>.<span class="ident">push</span>(<span class="ident">val</span>);
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Shift to the next document and adds</span>
|
||||
<span class="doccomment">/// all of the matching field values present in the document.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_document</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">doc</span>: <span class="kw-2">&</span><span class="ident">Document</span>) {
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">is_facet</span> {
|
||||
<span class="self">self</span>.<span class="ident">next_doc</span>();
|
||||
<span class="comment">// facets are indexed in the `SegmentWriter` as we encode their unordered id.</span>
|
||||
<span class="kw">if</span> <span class="op">!</span><span class="self">self</span>.<span class="ident">is_facet</span> {
|
||||
<span class="kw">for</span> <span class="ident">field_value</span> <span class="kw">in</span> <span class="ident">doc</span>.<span class="ident">field_values</span>() {
|
||||
<span class="kw">if</span> <span class="ident">field_value</span>.<span class="ident">field</span>() <span class="op">==</span> <span class="self">self</span>.<span class="ident">field</span> {
|
||||
<span class="self">self</span>.<span class="ident">add_val</span>(<span class="ident">value_to_u64</span>(<span class="ident">field_value</span>.<span class="ident">value</span>()));
|
||||
@@ -221,6 +282,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Register all of the values associated to a document.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// The method returns the `DocId` of the document that was</span>
|
||||
<span class="doccomment">/// just written.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_document_vals</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">vals</span>: <span class="kw-2">&</span>[<span class="ident">UnorderedTermId</span>]) <span class="op">-></span> <span class="ident">DocId</span> {
|
||||
<span class="kw">let</span> <span class="ident">doc</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">doc_index</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">DocId</span>;
|
||||
<span class="self">self</span>.<span class="ident">next_doc</span>();
|
||||
<span class="self">self</span>.<span class="ident">vals</span>.<span class="ident">extend_from_slice</span>(<span class="ident">vals</span>);
|
||||
<span class="ident">doc</span>
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Serializes fast field values by pushing them to the `FastFieldSerializer`.</span>
|
||||
<span class="doccomment">///</span>
|
||||
<span class="doccomment">/// HashMap makes it possible to remap them before serializing.</span>
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
<span id="218">218</span>
|
||||
<span id="219">219</span>
|
||||
<span id="220">220</span>
|
||||
<span id="221">221</span>
|
||||
</pre><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">schema</span>::{<span class="ident">Cardinality</span>, <span class="ident">Document</span>, <span class="ident">Field</span>, <span class="ident">Schema</span>};
|
||||
<span class="kw">use</span> <span class="ident">fastfield</span>::<span class="ident">FastFieldSerializer</span>;
|
||||
@@ -363,7 +362,6 @@
|
||||
<span class="ident">field_writer</span>.<span class="ident">add_document</span>(<span class="ident">doc</span>);
|
||||
}
|
||||
<span class="kw">for</span> <span class="ident">field_writer</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">multi_values_writers</span> {
|
||||
<span class="ident">field_writer</span>.<span class="ident">next_doc</span>();
|
||||
<span class="ident">field_writer</span>.<span class="ident">add_document</span>(<span class="ident">doc</span>);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1185,7 +1185,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">postings</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">schema</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">fastfield</span>;
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">fieldnorm</span>;
|
||||
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod</span> <span class="ident">fieldnorm</span>;
|
||||
|
||||
<span class="kw">mod</span> <span class="ident">docset</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">docset</span>::{<span class="ident">DocSet</span>, <span class="ident">SkipResult</span>};
|
||||
|
||||
@@ -193,6 +193,10 @@
|
||||
<span id="136">136</span>
|
||||
<span id="137">137</span>
|
||||
<span id="138">138</span>
|
||||
<span id="139">139</span>
|
||||
<span id="140">140</span>
|
||||
<span id="141">141</span>
|
||||
<span id="142">142</span>
|
||||
</pre><pre class="rust ">
|
||||
<span class="kw">use</span> <span class="ident">schema</span>::{<span class="ident">IntOptions</span>, <span class="ident">TextOptions</span>};
|
||||
|
||||
@@ -219,9 +223,13 @@
|
||||
<span class="doccomment">/// not include the way the field must be indexed.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Copy</span>, <span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Eq</span>, <span class="ident">PartialEq</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Type</span> {
|
||||
<span class="doccomment">/// `&str`</span>
|
||||
<span class="ident">Str</span>,
|
||||
<span class="doccomment">/// `u64`</span>
|
||||
<span class="ident">U64</span>,
|
||||
<span class="doccomment">/// `i64`</span>
|
||||
<span class="ident">I64</span>,
|
||||
<span class="doccomment">/// `tantivy::schema::Facet`. Passed as a string in JSON.</span>
|
||||
<span class="ident">HierarchicalFacet</span>
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -145,7 +145,9 @@ The fast field writer just keeps the values in memory.</p>
|
||||
<td><a class="struct" href="struct.MultiValueIntFastFieldWriter.html"
|
||||
title='struct tantivy::fastfield::MultiValueIntFastFieldWriter'>MultiValueIntFastFieldWriter</a></td>
|
||||
<td class='docblock-short'>
|
||||
|
||||
<p>Writer for multi-valued (as in, more than one value per document)
|
||||
int fast field.</p>
|
||||
|
||||
</td>
|
||||
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||||
<table>
|
||||
|
||||
@@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["write_delete_bitset","Write a delete `BitSet`"]],"struct":[["DeleteBitSet","Set of deleted `DocId`s."],["FacetReader","The facet reader makes it possible to access the list of facets associated to a given document in a specific segment."],["FastFieldNotAvailableError","`FastFieldNotAvailableError` is returned when the user requested for a fast field reader, and the field was not defined in the schema as a fast field."],["FastFieldReader","Trait for accessing a fastfield."],["FastFieldSerializer","`FastFieldSerializer` is in charge of serializing fastfields on disk."],["FastFieldsWriter","The fastfieldswriter regroup all of the fast field writers."],["IntFastFieldWriter","Fast field writer for ints. The fast field writer just keeps the values in memory."],["MultiValueIntFastFieldReader","Reader for a multivalued `u64` fast field."],["MultiValueIntFastFieldWriter",""]],"trait":[["FastValue","Trait for types that are allowed for fast fields: (u64 or i64)."]],"type":[["Result","Result when trying to access a fast field reader."]]});
|
||||
initSidebarItems({"fn":[["write_delete_bitset","Write a delete `BitSet`"]],"struct":[["DeleteBitSet","Set of deleted `DocId`s."],["FacetReader","The facet reader makes it possible to access the list of facets associated to a given document in a specific segment."],["FastFieldNotAvailableError","`FastFieldNotAvailableError` is returned when the user requested for a fast field reader, and the field was not defined in the schema as a fast field."],["FastFieldReader","Trait for accessing a fastfield."],["FastFieldSerializer","`FastFieldSerializer` is in charge of serializing fastfields on disk."],["FastFieldsWriter","The fastfieldswriter regroup all of the fast field writers."],["IntFastFieldWriter","Fast field writer for ints. The fast field writer just keeps the values in memory."],["MultiValueIntFastFieldReader","Reader for a multivalued `u64` fast field."],["MultiValueIntFastFieldWriter","Writer for multi-valued (as in, more than one value per document) int fast field."]],"trait":[["FastValue","Trait for types that are allowed for fast fields: (u64 or i64)."]],"type":[["Result","Result when trying to access a fast field reader."]]});
|
||||
@@ -60,13 +60,13 @@
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.FastFieldsWriter.html" title="struct tantivy::fastfield::FastFieldsWriter">FastFieldsWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#18-108' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_schema' class="method"><span id='from_schema.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_schema' class='fnname'>from_schema</a>(schema: &<a class="struct" href="../../tantivy/schema/struct.Schema.html" title="struct tantivy::schema::Schema">Schema</a>) -> <a class="struct" href="../../tantivy/fastfield/struct.FastFieldsWriter.html" title="struct tantivy::fastfield::FastFieldsWriter">FastFieldsWriter</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#20-57' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create all <code>FastFieldWriter</code> required by the schema.</p>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.FastFieldsWriter.html" title="struct tantivy::fastfield::FastFieldsWriter">FastFieldsWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#18-107' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_schema' class="method"><span id='from_schema.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_schema' class='fnname'>from_schema</a>(schema: &<a class="struct" href="../../tantivy/schema/struct.Schema.html" title="struct tantivy::schema::Schema">Schema</a>) -> <a class="struct" href="../../tantivy/fastfield/struct.FastFieldsWriter.html" title="struct tantivy::fastfield::FastFieldsWriter">FastFieldsWriter</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#20-57' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create all <code>FastFieldWriter</code> required by the schema.</p>
|
||||
</div><h4 id='method.get_field_writer' class="method"><span id='get_field_writer.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_field_writer' class='fnname'>get_field_writer</a>(<br> &mut self, <br> field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="../../tantivy/fastfield/struct.IntFastFieldWriter.html" title="struct tantivy::fastfield::IntFastFieldWriter">IntFastFieldWriter</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#60-65' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Get the <code>FastFieldWriter</code> associated to a field.</p>
|
||||
</div><h4 id='method.get_multivalue_writer' class="method"><span id='get_multivalue_writer.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_multivalue_writer' class='fnname'>get_multivalue_writer</a>(<br> &mut self, <br> field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <a class="struct" href="../../tantivy/fastfield/struct.MultiValueIntFastFieldWriter.html" title="struct tantivy::fastfield::MultiValueIntFastFieldWriter">MultiValueIntFastFieldWriter</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#71-79' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the fast field multi-value writer for the given field.</p>
|
||||
<p>Returns None if the field does not exist, or is not
|
||||
configured as a multivalued fastfield in the schema.</p>
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#82-90' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Indexes all of the fastfields of a new document.</p>
|
||||
</div><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(<br> &self, <br> serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>, <br> mapping: &<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#94-107' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Serializes all of the <code>FastFieldWriter</code>s by pushing them in
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#82-89' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Indexes all of the fastfields of a new document.</p>
|
||||
</div><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(<br> &self, <br> serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>, <br> mapping: &<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#93-106' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Serializes all of the <code>FastFieldWriter</code>s by pushing them in
|
||||
order to the fast field serializer.</p>
|
||||
</div></div>
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a>::<wbr><a class="struct" href=''>IntFastFieldWriter</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#125-132' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct IntFastFieldWriter { /* fields omitted */ }</pre></div><div class='docblock'><p>Fast field writer for ints.
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a>::<wbr><a class="struct" href=''>IntFastFieldWriter</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#124-131' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct IntFastFieldWriter { /* fields omitted */ }</pre></div><div class='docblock'><p>Fast field writer for ints.
|
||||
The fast field writer just keeps the values in memory.</p>
|
||||
<p>Only when the segment writer can be closed and
|
||||
persisted on disc, the fast field writer is
|
||||
@@ -71,15 +71,15 @@ using <code>common::i64_to_u64</code>.</p>
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.IntFastFieldWriter.html" title="struct tantivy::fastfield::IntFastFieldWriter">IntFastFieldWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#134-221' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>(field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> <a class="struct" href="../../tantivy/fastfield/struct.IntFastFieldWriter.html" title="struct tantivy::fastfield::IntFastFieldWriter">IntFastFieldWriter</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#136-145' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new <code>IntFastFieldWriter</code></p>
|
||||
</div><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self) -> <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#148-150' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the field that this writer is targetting.</p>
|
||||
</div><h4 id='method.add_val' class="method"><span id='add_val.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_val' class='fnname'>add_val</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#165-178' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Records a new value.</p>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.IntFastFieldWriter.html" title="struct tantivy::fastfield::IntFastFieldWriter">IntFastFieldWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#133-220' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>(field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> <a class="struct" href="../../tantivy/fastfield/struct.IntFastFieldWriter.html" title="struct tantivy::fastfield::IntFastFieldWriter">IntFastFieldWriter</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#135-144' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new <code>IntFastFieldWriter</code></p>
|
||||
</div><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self) -> <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#147-149' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the field that this writer is targetting.</p>
|
||||
</div><h4 id='method.add_val' class="method"><span id='add_val.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_val' class='fnname'>add_val</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#164-177' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Records a new value.</p>
|
||||
<p>The n-th value being recorded is implicitely
|
||||
associated to the document with the <code>DocId</code> n.
|
||||
(Well, <code>n-1</code> actually because of 0-indexing)</p>
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#199-202' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extract the fast field value from the document
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#198-201' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extract the fast field value from the document
|
||||
(or use the default value) and records it.</p>
|
||||
</div><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(&self, serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#205-220' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Push the fast fields value to the <code>FastFieldWriter</code>.</p>
|
||||
</div><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(&self, serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/writer.rs.html#204-219' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Push the fast fields value to the <code>FastFieldWriter</code>.</p>
|
||||
</div></div>
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<nav class="sidebar">
|
||||
<div class="sidebar-menu">☰</div>
|
||||
<a href='../../tantivy/index.html'><img src='http://fulmicoton.com/tantivy-logo/tantivy-logo.png' alt='logo' width='100'></a>
|
||||
<p class='location'>Struct MultiValueIntFastFieldWriter</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.field">field</a><a href="#method.next_doc">next_doc</a><a href="#method.add_val">add_val</a><a href="#method.add_document">add_document</a><a href="#method.serialize">serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a></p><script>window.sidebarCurrent = {name: 'MultiValueIntFastFieldWriter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||||
<p class='location'>Struct MultiValueIntFastFieldWriter</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.field">field</a><a href="#method.add_document">add_document</a><a href="#method.add_document_vals">add_document_vals</a><a href="#method.serialize">serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a></p><script>window.sidebarCurrent = {name: 'MultiValueIntFastFieldWriter', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||||
</nav>
|
||||
|
||||
<div class="theme-picker">
|
||||
@@ -55,16 +55,36 @@
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a>::<wbr><a class="struct" href=''>MultiValueIntFastFieldWriter</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#10-15' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct MultiValueIntFastFieldWriter { /* fields omitted */ }</pre></div>
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>fastfield</a>::<wbr><a class="struct" href=''>MultiValueIntFastFieldWriter</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#32-37' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct MultiValueIntFastFieldWriter { /* fields omitted */ }</pre></div><div class='docblock'><p>Writer for multi-valued (as in, more than one value per document)
|
||||
int fast field.</p>
|
||||
<p>This <code>Writer</code> is only useful for advanced user.
|
||||
The normal way to get your multivalued int in your index
|
||||
is to</p>
|
||||
<ul>
|
||||
<li>declare your field with fast set to <code>Cardinality::MultiValues</code>
|
||||
in your schema</li>
|
||||
<li>add your document simply by calling <code>.add_document(...)</code>.</li>
|
||||
</ul>
|
||||
<p>The <code>MultiValueIntFastFieldWriter</code> can be acquired from the
|
||||
fastfield writer, by calling <a href="./struct.FastFieldsWriter.html#method.get_multivalue_writer"><code>.get_multivalue_writer(...)</code></a>.</p>
|
||||
<p>Once acquired, writing is done by calling calls to
|
||||
<code>.add_document_vals(&[u64])</code> once per document.</p>
|
||||
<p>The serializer makes it possible to remap all of the values
|
||||
that were pushed to the writer using a mapping.
|
||||
This makes it possible to push unordered term ids,
|
||||
during indexing and remap them to their respective
|
||||
term ids when the segment is getting serialized.</p>
|
||||
</div>
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.MultiValueIntFastFieldWriter.html" title="struct tantivy::fastfield::MultiValueIntFastFieldWriter">MultiValueIntFastFieldWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#17-111' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>(field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>, is_facet: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#19-26' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Creates a new <code>IntFastFieldWriter</code></p>
|
||||
</div><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self) -> <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#28-30' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.next_doc' class="method"><span id='next_doc.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.next_doc' class='fnname'>next_doc</a>(&mut self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#32-34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.add_val' class="method"><span id='add_val.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_val' class='fnname'>add_val</a>(&mut self, val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#41-43' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Records a new value.</p>
|
||||
<p>The n-th value being recorded is implicitely
|
||||
associated to the document with the <code>DocId</code> n.
|
||||
(Well, <code>n-1</code> actually because of 0-indexing)</p>
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#45-53' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(<br> &self, <br> serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>, <br> mapping_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#66-110' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Serializes fast field values by pushing them to the <code>FastFieldSerializer</code>.</p>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fastfield/struct.MultiValueIntFastFieldWriter.html" title="struct tantivy::fastfield::MultiValueIntFastFieldWriter">MultiValueIntFastFieldWriter</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#39-147' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self) -> <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#52-54' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the field associated to the <code>MultiValueIntFastFieldWriter</code></p>
|
||||
</div><h4 id='method.add_document' class="method"><span id='add_document.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document' class='fnname'>add_document</a>(&mut self, doc: &<a class="struct" href="../../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#68-78' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Shift to the next document and adds
|
||||
all of the matching field values present in the document.</p>
|
||||
</div><h4 id='method.add_document_vals' class="method"><span id='add_document_vals.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_document_vals' class='fnname'>add_document_vals</a>(&mut self, vals: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="type" href="../../tantivy/type.DocId.html" title="type tantivy::DocId">DocId</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#84-89' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Register all of the values associated to a document.</p>
|
||||
<p>The method returns the <code>DocId</code> of the document that was
|
||||
just written.</p>
|
||||
</div><h4 id='method.serialize' class="method"><span id='serialize.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize' class='fnname'>serialize</a>(<br> &self, <br> serializer: &mut <a class="struct" href="../../tantivy/fastfield/struct.FastFieldSerializer.html" title="struct tantivy::fastfield::FastFieldSerializer">FastFieldSerializer</a>, <br> mapping_opt: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>><br>) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fastfield/multivalued/writer.rs.html#102-146' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Serializes fast field values by pushing them to the <code>FastFieldSerializer</code>.</p>
|
||||
<p>HashMap makes it possible to remap them before serializing.
|
||||
Specifically, string terms are first stored in the writer as their
|
||||
position in the <code>IndexWriter</code>'s <code>HashMap</code>. This value is called
|
||||
|
||||
@@ -155,15 +155,6 @@ the example code (
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class="mod" href="fieldnorm/index.html"
|
||||
title='mod tantivy::fieldnorm'>fieldnorm</a></td>
|
||||
<td class='docblock-short'>
|
||||
<p>The fieldnorm represents the length associated to
|
||||
a given Field of a given document.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=' module-item'>
|
||||
<td><a class="mod" href="merge_policy/index.html"
|
||||
title='mod tantivy::merge_policy'>merge_policy</a></td>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>schema</a>::<wbr><a class="enum" href=''>FieldType</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#35-44' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum FieldType {
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>schema</a>::<wbr><a class="enum" href=''>FieldType</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#39-48' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum FieldType {
|
||||
Str(<a class="struct" href="../../tantivy/schema/struct.TextOptions.html" title="struct tantivy::schema::TextOptions">TextOptions</a>),
|
||||
U64(<a class="struct" href="../../tantivy/schema/struct.IntOptions.html" title="struct tantivy::schema::IntOptions">IntOptions</a>),
|
||||
I64(<a class="struct" href="../../tantivy/schema/struct.IntOptions.html" title="struct tantivy::schema::IntOptions">IntOptions</a>),
|
||||
@@ -72,12 +72,12 @@ how it should be handled by tantivy.</p>
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#46-138' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.value_type' class="method"><span id='value_type.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.value_type' class='fnname'>value_type</a>(&self) -> <a class="enum" href="../../tantivy/schema/enum.Type.html" title="enum tantivy::schema::Type">Type</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#49-60' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the value type associated for this field.</p>
|
||||
</div><h4 id='method.is_indexed' class="method"><span id='is_indexed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_indexed' class='fnname'>is_indexed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#63-71' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>returns true iff the field is indexed.</p>
|
||||
</div><h4 id='method.get_index_record_option' class="method"><span id='get_index_record_option.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_index_record_option' class='fnname'>get_index_record_option</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../tantivy/schema/enum.IndexRecordOption.html" title="enum tantivy::schema::IndexRecordOption">IndexRecordOption</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#77-91' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Given a field configuration, return the maximal possible
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#50-142' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.value_type' class="method"><span id='value_type.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.value_type' class='fnname'>value_type</a>(&self) -> <a class="enum" href="../../tantivy/schema/enum.Type.html" title="enum tantivy::schema::Type">Type</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#53-64' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the value type associated for this field.</p>
|
||||
</div><h4 id='method.is_indexed' class="method"><span id='is_indexed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_indexed' class='fnname'>is_indexed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#67-75' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>returns true iff the field is indexed.</p>
|
||||
</div><h4 id='method.get_index_record_option' class="method"><span id='get_index_record_option.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_index_record_option' class='fnname'>get_index_record_option</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../tantivy/schema/enum.IndexRecordOption.html" title="enum tantivy::schema::IndexRecordOption">IndexRecordOption</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#81-95' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Given a field configuration, return the maximal possible
|
||||
<code>IndexRecordOption</code> available.</p>
|
||||
<p>If the field is not indexed, then returns <code>None</code>.</p>
|
||||
</div><h4 id='method.value_from_json' class="method"><span id='value_from_json.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.value_from_json' class='fnname'>value_from_json</a>(<br> &self, <br> json: &<a class="enum" href="../../serde_json/value/enum.Value.html" title="enum serde_json::value::Value">JsonValue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../tantivy/schema/enum.Value.html" title="enum tantivy::schema::Value">Value</a>, ValueParsingError></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#98-137' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses a field value from json, given the target FieldType.</p>
|
||||
</div><h4 id='method.value_from_json' class="method"><span id='value_from_json.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.value_from_json' class='fnname'>value_from_json</a>(<br> &self, <br> json: &<a class="enum" href="../../serde_json/value/enum.Value.html" title="enum serde_json::value::Value">JsonValue</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../../tantivy/schema/enum.Value.html" title="enum tantivy::schema::Value">Value</a>, ValueParsingError></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#102-141' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Parses a field value from json, given the target FieldType.</p>
|
||||
<p>Tantivy will not try to cast values.
|
||||
For instance, If the json value is the integer <code>3</code> and the
|
||||
target field is a <code>Str</code>, this method will return an Error.</p>
|
||||
@@ -85,11 +85,11 @@ target field is a <code>Str</code>, this method will return an Error.</p>
|
||||
<h2 id='implementations' class='small-section-header'>
|
||||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='implementations-list'><h3 id='impl-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
<div id='implementations-list'><h3 id='impl-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130-132' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Eq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-PartialEq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-Eq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-PartialEq' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a></code><a href='#impl-PartialEq' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, __arg_0: &<a class="enum" href="../../tantivy/schema/enum.FieldType.html" title="enum tantivy::schema::FieldType">FieldType</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#38' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div></div>
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</form>
|
||||
</nav>
|
||||
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>schema</a>::<wbr><a class="enum" href=''>Type</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#25-30' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum Type {
|
||||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>tantivy</a>::<wbr><a href='index.html'>schema</a>::<wbr><a class="enum" href=''>Type</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/tantivy/schema/field_type.rs.html#25-34' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust enum'>pub enum Type {
|
||||
Str,
|
||||
U64,
|
||||
I64,
|
||||
@@ -65,7 +65,11 @@
|
||||
not include the way the field must be indexed.</p>
|
||||
</div><h2 id='variants' class='variants small-section-header'>
|
||||
Variants<a href='#variants' class='anchor'></a></h2>
|
||||
<span id="variant.Str" class="variant small-section-header"><a href="#variant.Str" class="anchor field"></a><span id='Str.v' class='invisible'><code>Str</code></span></span><span id="variant.U64" class="variant small-section-header"><a href="#variant.U64" class="anchor field"></a><span id='U64.v' class='invisible'><code>U64</code></span></span><span id="variant.I64" class="variant small-section-header"><a href="#variant.I64" class="anchor field"></a><span id='I64.v' class='invisible'><code>I64</code></span></span><span id="variant.HierarchicalFacet" class="variant small-section-header"><a href="#variant.HierarchicalFacet" class="anchor field"></a><span id='HierarchicalFacet.v' class='invisible'><code>HierarchicalFacet</code></span></span>
|
||||
<span id="variant.Str" class="variant small-section-header"><a href="#variant.Str" class="anchor field"></a><span id='Str.v' class='invisible'><code>Str</code></span></span><div class='docblock'><p><code>&str</code></p>
|
||||
</div><span id="variant.U64" class="variant small-section-header"><a href="#variant.U64" class="anchor field"></a><span id='U64.v' class='invisible'><code>U64</code></span></span><div class='docblock'><p><code>u64</code></p>
|
||||
</div><span id="variant.I64" class="variant small-section-header"><a href="#variant.I64" class="anchor field"></a><span id='I64.v' class='invisible'><code>I64</code></span></span><div class='docblock'><p><code>i64</code></p>
|
||||
</div><span id="variant.HierarchicalFacet" class="variant small-section-header"><a href="#variant.HierarchicalFacet" class="anchor field"></a><span id='HierarchicalFacet.v' class='invisible'><code>HierarchicalFacet</code></span></span><div class='docblock'><p><code>tantivy::schema::Facet</code>. Passed as a string in JSON.</p>
|
||||
</div>
|
||||
<h2 id='implementations' class='small-section-header'>
|
||||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||||
</h2>
|
||||
|
||||
@@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["ErrorKind","The kind of an error."],["SegmentComponent","Enum describing each component of a tantivy segment. Each component is stored in its own file, using the pattern `segment_uuid`.`component_extension`, except the delete component that takes an `segment_uuid`.`delete_opstamp`.`component_extension`"],["SkipResult","Expresses the outcome of a call to `DocSet`'s `.skip_next(...)`."]],"fn":[["i64_to_u64","Maps a `i64` to `u64`"],["u64_to_i64","Reverse the mapping given by `i64_to_u64`."],["version","Expose the current version of tantivy, as well whether it was compiled with the simd compression."]],"macro":[["doc","`doc!` is a shortcut that helps building `Document` objects."]],"mod":[["collector","Defines how the documents matching a search query should be processed."],["directory","WORM directory abstraction."],["fastfield","Column oriented field storage for tantivy."],["fieldnorm","The fieldnorm represents the length associated to a given Field of a given document."],["merge_policy","Defines tantivy's merging strategy"],["postings","Postings module (also called inverted index)"],["query","Query"],["schema","Schema definition for tantivy's indices."],["store","Compressed/slow/row-oriented storage for documents."],["termdict","The term dictionary is one of the key datastructure of tantivy. It associates sorted `terms` to a `TermInfo` struct that serves as an address in their respective posting list."],["tokenizer","Tokenizer are in charge of chopping text into a stream of tokens ready for indexing."]],"struct":[["DocAddress","`DocAddress` contains all the necessary information to identify a document given a `Searcher` object."],["Document","Tantivy's Document is the object that can be indexed and then searched for."],["Error","The Error type."],["Index","Search Index"],["IndexWriter","`IndexWriter` is the user entry-point to add document to an index."],["InvertedIndexReader","The inverted index reader is in charge of accessing the inverted index associated to a specific field."],["Searcher","Holds a list of `SegmentReader`s ready for search."],["Segment","A segment is a piece of the index."],["SegmentId","Uuid identifying a segment."],["SegmentMeta","`SegmentMeta` contains simple meta information about a segment."],["SegmentReader","Entry point to access all of the datastructures of the `Segment`"],["Term","Term represents the value that the token can take."]],"trait":[["Directory","Write-once read many (WORM) abstraction for where tantivy's data should be stored."],["DocSet","Represents an iterable set of sorted doc ids."],["Postings","Postings (also called inverted list)"],["ResultExt","Additional methods for `Result`, for easy interaction with this crate."]],"type":[["DocId","A `u32` identifying a document within a segment. Documents have their `DocId` assigned incrementally, as they are added in the segment."],["Result","Tantivy result."],["Score","A f32 that represents the relevance of the document to the query"],["SegmentLocalId","A `SegmentLocalId` identifies a segment. It only makes sense for a given searcher."]]});
|
||||
initSidebarItems({"enum":[["ErrorKind","The kind of an error."],["SegmentComponent","Enum describing each component of a tantivy segment. Each component is stored in its own file, using the pattern `segment_uuid`.`component_extension`, except the delete component that takes an `segment_uuid`.`delete_opstamp`.`component_extension`"],["SkipResult","Expresses the outcome of a call to `DocSet`'s `.skip_next(...)`."]],"fn":[["i64_to_u64","Maps a `i64` to `u64`"],["u64_to_i64","Reverse the mapping given by `i64_to_u64`."],["version","Expose the current version of tantivy, as well whether it was compiled with the simd compression."]],"macro":[["doc","`doc!` is a shortcut that helps building `Document` objects."]],"mod":[["collector","Defines how the documents matching a search query should be processed."],["directory","WORM directory abstraction."],["fastfield","Column oriented field storage for tantivy."],["merge_policy","Defines tantivy's merging strategy"],["postings","Postings module (also called inverted index)"],["query","Query"],["schema","Schema definition for tantivy's indices."],["store","Compressed/slow/row-oriented storage for documents."],["termdict","The term dictionary is one of the key datastructure of tantivy. It associates sorted `terms` to a `TermInfo` struct that serves as an address in their respective posting list."],["tokenizer","Tokenizer are in charge of chopping text into a stream of tokens ready for indexing."]],"struct":[["DocAddress","`DocAddress` contains all the necessary information to identify a document given a `Searcher` object."],["Document","Tantivy's Document is the object that can be indexed and then searched for."],["Error","The Error type."],["Index","Search Index"],["IndexWriter","`IndexWriter` is the user entry-point to add document to an index."],["InvertedIndexReader","The inverted index reader is in charge of accessing the inverted index associated to a specific field."],["Searcher","Holds a list of `SegmentReader`s ready for search."],["Segment","A segment is a piece of the index."],["SegmentId","Uuid identifying a segment."],["SegmentMeta","`SegmentMeta` contains simple meta information about a segment."],["SegmentReader","Entry point to access all of the datastructures of the `Segment`"],["Term","Term represents the value that the token can take."]],"trait":[["Directory","Write-once read many (WORM) abstraction for where tantivy's data should be stored."],["DocSet","Represents an iterable set of sorted doc ids."],["Postings","Postings (also called inverted list)"],["ResultExt","Additional methods for `Result`, for easy interaction with this crate."]],"type":[["DocId","A `u32` identifying a document within a segment. Documents have their `DocId` assigned incrementally, as they are added in the segment."],["Result","Tantivy result."],["Score","A f32 that represents the relevance of the document to the query"],["SegmentLocalId","A `SegmentLocalId` identifies a segment. It only makes sense for a given searcher."]]});
|
||||
@@ -34,7 +34,7 @@
|
||||
<nav class="sidebar">
|
||||
<div class="sidebar-menu">☰</div>
|
||||
<a href='../tantivy/index.html'><img src='http://fulmicoton.com/tantivy-logo/tantivy-logo.png' alt='logo' width='100'></a>
|
||||
<p class='location'>Struct Searcher</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.doc">doc</a><a href="#method.schema">schema</a><a href="#method.num_docs">num_docs</a><a href="#method.doc_freq">doc_freq</a><a href="#method.segment_readers">segment_readers</a><a href="#method.segment_reader">segment_reader</a><a href="#method.search">search</a><a href="#method.field">field</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">!Sync</a></div></div><p class='location'><a href='index.html'>tantivy</a></p><script>window.sidebarCurrent = {name: 'Searcher', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||||
<p class='location'>Struct Searcher</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.doc">doc</a><a href="#method.schema">schema</a><a href="#method.num_docs">num_docs</a><a href="#method.doc_freq">doc_freq</a><a href="#method.segment_readers">segment_readers</a><a href="#method.segment_reader">segment_reader</a><a href="#method.search">search</a><a href="#method.field">field</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">!Sync</a></div></div><p class='location'><a href='index.html'>tantivy</a></p><script>window.sidebarCurrent = {name: 'Searcher', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||||
</nav>
|
||||
|
||||
<div class="theme-picker">
|
||||
@@ -62,21 +62,22 @@ the destruction of the <code>Searcher</code>.</p>
|
||||
<h2 id='methods' class='small-section-header'>
|
||||
Methods<a href='#methods' class='anchor'></a>
|
||||
</h2>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../tantivy/struct.Searcher.html" title="struct tantivy::Searcher">Searcher</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#24-88' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>(schema: <a class="struct" href="../tantivy/schema/struct.Schema.html" title="struct tantivy::schema::Schema">Schema</a>, segment_readers: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../tantivy/struct.SegmentReader.html" title="struct tantivy::SegmentReader">SegmentReader</a>>) -> <a class="struct" href="../tantivy/struct.Searcher.html" title="struct tantivy::Searcher">Searcher</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#26-33' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.doc' class="method"><span id='doc.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.doc' class='fnname'>doc</a>(&self, doc_address: &<a class="struct" href="../tantivy/struct.DocAddress.html" title="struct tantivy::DocAddress">DocAddress</a>) -> <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a><<a class="struct" href="../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#38-42' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Fetches a document from tantivy's store given a <code>DocAddress</code>.</p>
|
||||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../tantivy/struct.Searcher.html" title="struct tantivy::Searcher">Searcher</a></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#24-90' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.doc' class="method"><span id='doc.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.doc' class='fnname'>doc</a>(&self, doc_address: &<a class="struct" href="../tantivy/struct.DocAddress.html" title="struct tantivy::DocAddress">DocAddress</a>) -> <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a><<a class="struct" href="../tantivy/struct.Document.html" title="struct tantivy::Document">Document</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#39-43' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Fetches a document from tantivy's store given a <code>DocAddress</code>.</p>
|
||||
<p>The searcher uses the segment ordinal to route the
|
||||
the request to the right <code>Segment</code>.</p>
|
||||
</div><h4 id='method.schema' class="method"><span id='schema.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.schema' class='fnname'>schema</a>(&self) -> &<a class="struct" href="../tantivy/schema/struct.Schema.html" title="struct tantivy::schema::Schema">Schema</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#44-46' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.num_docs' class="method"><span id='num_docs.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.num_docs' class='fnname'>num_docs</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#49-54' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the overall number of documents in the index.</p>
|
||||
</div><h4 id='method.doc_freq' class="method"><span id='doc_freq.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.doc_freq' class='fnname'>doc_freq</a>(&self, term: &<a class="struct" href="../tantivy/struct.Term.html" title="struct tantivy::Term">Term</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#58-63' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the overall number of documents containing
|
||||
</div><h4 id='method.schema' class="method"><span id='schema.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.schema' class='fnname'>schema</a>(&self) -> &<a class="struct" href="../tantivy/schema/struct.Schema.html" title="struct tantivy::schema::Schema">Schema</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#46-48' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the schema associated to the index of this searcher.</p>
|
||||
</div><h4 id='method.num_docs' class="method"><span id='num_docs.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.num_docs' class='fnname'>num_docs</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#51-56' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the overall number of documents in the index.</p>
|
||||
</div><h4 id='method.doc_freq' class="method"><span id='doc_freq.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.doc_freq' class='fnname'>doc_freq</a>(&self, term: &<a class="struct" href="../tantivy/struct.Term.html" title="struct tantivy::Term">Term</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#60-65' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the overall number of documents containing
|
||||
the given term.</p>
|
||||
</div><h4 id='method.segment_readers' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></h3><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span></code></div></div><span id='segment_readers.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.segment_readers' class='fnname'>segment_readers</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="struct" href="../tantivy/struct.SegmentReader.html" title="struct tantivy::SegmentReader">SegmentReader</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#66-68' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the list of segment readers</p>
|
||||
</div><h4 id='method.segment_reader' class="method"><span id='segment_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.segment_reader' class='fnname'>segment_reader</a>(&self, segment_ord: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> &<a class="struct" href="../tantivy/struct.SegmentReader.html" title="struct tantivy::SegmentReader">SegmentReader</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#71-73' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the segment_reader associated with the given segment_ordinal</p>
|
||||
</div><h4 id='method.search' class="method"><span id='search.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.search' class='fnname'>search</a><C: <a class="trait" href="../tantivy/collector/trait.Collector.html" title="trait tantivy::collector::Collector">Collector</a>>(<br> &self, <br> query: &<a class="trait" href="../tantivy/query/trait.Query.html" title="trait tantivy::query::Query">Query</a>, <br> collector: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>C<br>) -> <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#76-78' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Runs a query on the segment readers wrapped by the searcher</p>
|
||||
</div><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> FieldSearcher</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#81-87' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the field searcher associated to a <code>Field</code>.</p>
|
||||
</div><h4 id='method.segment_readers' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></h3><code class="content"><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a mut [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span><span class="where fmt-newline">impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></span></code></div></div><span id='segment_readers.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.segment_readers' class='fnname'>segment_readers</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="struct" href="../tantivy/struct.SegmentReader.html" title="struct tantivy::SegmentReader">SegmentReader</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#68-70' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the list of segment readers</p>
|
||||
</div><h4 id='method.segment_reader' class="method"><span id='segment_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.segment_reader' class='fnname'>segment_reader</a>(&self, segment_ord: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> &<a class="struct" href="../tantivy/struct.SegmentReader.html" title="struct tantivy::SegmentReader">SegmentReader</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#73-75' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the segment_reader associated with the given segment_ordinal</p>
|
||||
</div><h4 id='method.search' class="method"><span id='search.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.search' class='fnname'>search</a><C: <a class="trait" href="../tantivy/collector/trait.Collector.html" title="trait tantivy::collector::Collector">Collector</a>>(<br> &self, <br> query: &<a class="trait" href="../tantivy/query/trait.Query.html" title="trait tantivy::query::Query">Query</a>, <br> collector: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>C<br>) -> <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#78-80' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Runs a query on the segment readers wrapped by the searcher</p>
|
||||
</div><h4 id='method.field' class="method"><span id='field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.field' class='fnname'>field</a>(&self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> FieldSearcher</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#83-89' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the field searcher associated to a <code>Field</code>.</p>
|
||||
</div></div>
|
||||
<h2 id='implementations' class='small-section-header'>
|
||||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||||
</h2>
|
||||
<div id='implementations-list'><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../tantivy/struct.Searcher.html" title="struct tantivy::Searcher">Searcher</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#111-119' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#112-118' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
<div id='implementations-list'><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../tantivy/struct.Searcher.html" title="struct tantivy::Searcher">Searcher</a></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#113-121' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/searcher.rs.html#114-120' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div></div>
|
||||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||||
|
||||
@@ -92,7 +92,7 @@ declared as a fast field in the schema.</p>
|
||||
</div><h4 id='method.multi_fast_field_reader' class="method"><span id='multi_fast_field_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.multi_fast_field_reader' class='fnname'>multi_fast_field_reader</a><Item: <a class="trait" href="../tantivy/fastfield/trait.FastValue.html" title="trait tantivy::fastfield::FastValue">FastValue</a>>(<br> &self, <br> field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a><br>) -> <a class="type" href="../tantivy/fastfield/type.Result.html" title="type tantivy::fastfield::Result">Result</a><<a class="struct" href="../tantivy/fastfield/struct.MultiValueIntFastFieldReader.html" title="struct tantivy::fastfield::MultiValueIntFastFieldReader">MultiValueIntFastFieldReader</a><Item>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#125-144' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Accessor to the <code>MultiValueIntFastFieldReader</code> associated to a given <code>Field</code>.
|
||||
May panick if the field is not a multivalued fastfield of the type <code>Item</code>.</p>
|
||||
</div><h4 id='method.facet_reader' class="method"><span id='facet_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.facet_reader' class='fnname'>facet_reader</a>(&self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a><<a class="struct" href="../tantivy/fastfield/struct.FacetReader.html" title="struct tantivy::fastfield::FacetReader">FacetReader</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#147-168' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Accessor to the <code>FacetReader</code> associated to a given <code>Field</code>.</p>
|
||||
</div><h4 id='method.get_fieldnorms_reader' class="method"><span id='get_fieldnorms_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_fieldnorms_reader' class='fnname'>get_fieldnorms_reader</a>(&self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> <a class="struct" href="../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#178-187' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Accessor to the segment's <code>Field norms</code>'s reader.</p>
|
||||
</div><h4 id='method.get_fieldnorms_reader' class="method"><span id='get_fieldnorms_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.get_fieldnorms_reader' class='fnname'>get_fieldnorms_reader</a>(&self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -> FieldNormReader</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#178-187' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Accessor to the segment's <code>Field norms</code>'s reader.</p>
|
||||
<p>Field norms are the length (in tokens) of the fields.
|
||||
It is used in the computation of the [TfIdf]
|
||||
(https://fulmicoton.gitbooks.io/tantivy-doc/content/tfidf.html).</p>
|
||||
|
||||
Reference in New Issue
Block a user