Automatic Travis documentation build

This commit is contained in:
Travis CI User
2018-05-08 03:42:17 +00:00
parent 61ba426874
commit 2230eb658f
15 changed files with 114 additions and 511 deletions

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

View File

@@ -28,6 +28,10 @@
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
</pre><pre class="rust ">
<span class="kw">use</span> <span class="ident">common</span>::<span class="ident">CompositeWrite</span>;
<span class="kw">use</span> <span class="ident">directory</span>::<span class="ident">WritePtr</span>;
@@ -35,6 +39,8 @@
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>::<span class="ident">Write</span>;
<span class="doccomment">/// The fieldnorms serializer is in charge of</span>
<span class="doccomment">/// the serialization of field norms for all fields.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">FieldNormsSerializer</span> {
<span class="ident">composite_write</span>: <span class="ident">CompositeWrite</span>,
}
@@ -47,6 +53,7 @@
<span class="prelude-val">Ok</span>(<span class="ident">FieldNormsSerializer</span> { <span class="ident">composite_write</span> })
}
<span class="doccomment">/// Serialize the given field</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">serialize_field</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">field</span>: <span class="ident">Field</span>, <span class="ident">fieldnorms_data</span>: <span class="kw-2">&amp;</span>[<span class="ident">u8</span>]) <span class="op">-&gt;</span> <span class="ident">io</span>::<span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">write</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">composite_write</span>.<span class="ident">for_field</span>(<span class="ident">field</span>);
<span class="ident">write</span>.<span class="ident">write_all</span>(<span class="ident">fieldnorms_data</span>)<span class="question-mark">?</span>;
@@ -54,6 +61,7 @@
<span class="prelude-val">Ok</span>(())
}
<span class="doccomment">/// Clean up / flush / close</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">close</span>(<span class="self">self</span>) <span class="op">-&gt;</span> <span class="ident">io</span>::<span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="self">self</span>.<span class="ident">composite_write</span>.<span class="ident">close</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(())

View File

@@ -61,6 +61,28 @@
<span id="61">61</span>
<span id="62">62</span>
<span id="63">63</span>
<span id="64">64</span>
<span id="65">65</span>
<span id="66">66</span>
<span id="67">67</span>
<span id="68">68</span>
<span id="69">69</span>
<span id="70">70</span>
<span id="71">71</span>
<span id="72">72</span>
<span id="73">73</span>
<span id="74">74</span>
<span id="75">75</span>
<span id="76">76</span>
<span id="77">77</span>
<span id="78">78</span>
<span id="79">79</span>
<span id="80">80</span>
<span id="81">81</span>
<span id="82">82</span>
<span id="83">83</span>
<span id="84">84</span>
<span id="85">85</span>
</pre><pre class="rust ">
<span class="kw">use</span> <span class="ident">DocId</span>;
@@ -70,13 +92,20 @@
<span class="kw">use</span> <span class="ident">schema</span>::<span class="ident">Schema</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">io</span>;
<span class="doccomment">/// The `FieldNormsWriter` is in charge of tracking the fieldnorm byte</span>
<span class="doccomment">/// of each document for each field with field norms.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// `FieldNormsWriter` stores a Vec&lt;u8&gt; for each tracked field, using a</span>
<span class="doccomment">/// byte per document per field.</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">FieldNormsWriter</span> {
<span class="ident">fields</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Field</span><span class="op">&gt;</span>,
<span class="ident">fieldnorms_buffer</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">u8</span><span class="op">&gt;&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">FieldNormsWriter</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fields_with_fieldnorm</span>(<span class="ident">schema</span>: <span class="kw-2">&amp;</span><span class="ident">Schema</span>) <span class="op">-&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Field</span><span class="op">&gt;</span> {
<span class="doccomment">/// Returns the fields that should have field norms computed</span>
<span class="doccomment">/// according to the given schema.</span>
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">fields_with_fieldnorm</span>(<span class="ident">schema</span>: <span class="kw-2">&amp;</span><span class="ident">Schema</span>) <span class="op">-&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Field</span><span class="op">&gt;</span> {
<span class="ident">schema</span>
.<span class="ident">fields</span>()
.<span class="ident">iter</span>()
@@ -86,6 +115,8 @@
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Field</span><span class="op">&gt;&gt;</span>()
}
<span class="doccomment">/// Initialize with state for tracking the field norm fields</span>
<span class="doccomment">/// specified in the schema.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">for_schema</span>(<span class="ident">schema</span>: <span class="kw-2">&amp;</span><span class="ident">Schema</span>) <span class="op">-&gt;</span> <span class="ident">FieldNormsWriter</span> {
<span class="kw">let</span> <span class="ident">fields</span> <span class="op">=</span> <span class="ident">FieldNormsWriter</span>::<span class="ident">fields_with_fieldnorm</span>(<span class="ident">schema</span>);
<span class="kw">let</span> <span class="ident">max_field</span> <span class="op">=</span> <span class="ident">fields</span>
@@ -100,12 +131,24 @@
}
}
<span class="doccomment">/// Ensure that all documents in 0..max_doc have a byte associated with them</span>
<span class="doccomment">/// in each of the fieldnorm vectors.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Will extend with 0-bytes for documents that have not been seen.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fill_up_to_max_doc</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">max_doc</span>: <span class="ident">DocId</span>) {
<span class="kw">for</span> <span class="kw-2">&amp;</span><span class="ident">field</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">fields</span>.<span class="ident">iter</span>() {
<span class="self">self</span>.<span class="ident">fieldnorms_buffer</span>[<span class="ident">field</span>.<span class="number">0</span> <span class="kw">as</span> <span class="ident">usize</span>].<span class="ident">resize</span>(<span class="ident">max_doc</span> <span class="kw">as</span> <span class="ident">usize</span>, <span class="number">0u8</span>);
}
}
<span class="doccomment">/// Set the fieldnorm byte for the given document for the given field.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Will internally convert the u32 `fieldnorm` value to the appropriate byte</span>
<span class="doccomment">/// to approximate the field norm in less space.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// * doc - the document id</span>
<span class="doccomment">/// * field - the field being set</span>
<span class="doccomment">/// * fieldnorm - the number of terms present in document `doc` in field `field`</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">record</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">doc</span>: <span class="ident">DocId</span>, <span class="ident">field</span>: <span class="ident">Field</span>, <span class="ident">fieldnorm</span>: <span class="ident">u32</span>) {
<span class="kw">let</span> <span class="ident">fieldnorm_buffer</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">u8</span><span class="op">&gt;</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>.<span class="ident">fieldnorms_buffer</span>[<span class="ident">field</span>.<span class="number">0</span> <span class="kw">as</span> <span class="ident">usize</span>];
<span class="macro">assert</span><span class="macro">!</span>(
@@ -117,6 +160,7 @@
<span class="ident">fieldnorm_buffer</span>[<span class="ident">doc</span> <span class="kw">as</span> <span class="ident">usize</span>] <span class="op">=</span> <span class="ident">fieldnorm_to_id</span>(<span class="ident">fieldnorm</span>);
}
<span class="doccomment">/// Serialize the seen fieldnorm values to the serializer for all fields.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">serialize</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">fieldnorms_serializer</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">FieldNormsSerializer</span>) <span class="op">-&gt;</span> <span class="ident">io</span>::<span class="prelude-ty">Result</span><span class="op">&lt;</span>()<span class="op">&gt;</span> {
<span class="kw">for</span> <span class="kw-2">&amp;</span><span class="ident">field</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">fields</span>.<span class="ident">iter</span>() {
<span class="kw">let</span> <span class="ident">fieldnorm_values</span>: <span class="kw-2">&amp;</span>[<span class="ident">u8</span>] <span class="op">=</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">fieldnorms_buffer</span>[<span class="ident">field</span>.<span class="number">0</span> <span class="kw">as</span> <span class="ident">usize</span>][..];

View File

@@ -1131,7 +1131,7 @@
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">collector</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">directory</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">fastfield</span>;
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod</span> <span class="ident">fieldnorm</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">fieldnorm</span>;
<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">query</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">schema</span>;

File diff suppressed because one or more lines are too long

View File

@@ -1,61 +1,4 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `fieldnorm` mod in crate `tantivy`.">
<meta name="keywords" content="rust, rustlang, rust-lang, fieldnorm">
<title>tantivy::fieldnorm - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css"
id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc mod">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<a href='../../tantivy/index.html'><img src='http://fulmicoton.com/tantivy-logo/tantivy-logo.png' alt='logo' width='100'></a>
<p class='location'>Module fieldnorm</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>tantivy</a></p><script>window.sidebarCurrent = {name: 'fieldnorm', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>tantivy</a>::<wbr><a class="mod" href=''>fieldnorm</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/mod.rs.html#1-28' title='goto source code'>[src]</a></span></h1><div class='docblock'><p>The fieldnorm represents the length associated to
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `fieldnorm` mod in crate `tantivy`."><meta name="keywords" content="rust, rustlang, rust-lang, fieldnorm"><title>tantivy::fieldnorm - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../tantivy/index.html'><img src='http://fulmicoton.com/tantivy-logo/tantivy-logo.png' alt='logo' width='100'></a><p class='location'>Module fieldnorm</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class='location'><a href='../index.html'>tantivy</a></p><script>window.sidebarCurrent = {name: 'fieldnorm', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press S to search, ? for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>tantivy</a>::<wbr><a class="mod" href=''>fieldnorm</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/mod.rs.html#1-28' title='goto source code'>[src]</a></span></h1><div class='docblock'><p>The fieldnorm represents the length associated to
a given Field of a given document.</p>
<p>This metric is important to compute the score of a
document : a document having a query word in one its short fields
@@ -85,77 +28,17 @@ a given Field of a given document.</p>
<td><a class="struct" href="struct.FieldNormsSerializer.html"
title='struct tantivy::fieldnorm::FieldNormsSerializer'>FieldNormsSerializer</a></td>
<td class='docblock-short'>
<p>The fieldnorms serializer is in charge of
the serialization of field norms for all fields.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.FieldNormsWriter.html"
title='struct tantivy::fieldnorm::FieldNormsWriter'>FieldNormsWriter</a></td>
<td class='docblock-short'>
<p>The <code>FieldNormsWriter</code> is in charge of tracking the fieldnorm byte
of each document for each field with field norms.</p>
</td>
</tr></table></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "tantivy";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>
</tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "tantivy";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@@ -1 +1 @@
initSidebarItems({"struct":[["FieldNormReader","Reads the fieldnorm associated to a document. The fieldnorm represents the length associated to a given Field of a given document."],["FieldNormsSerializer",""],["FieldNormsWriter",""]]});
initSidebarItems({"struct":[["FieldNormReader","Reads the fieldnorm associated to a document. The fieldnorm represents the length associated to a given Field of a given document."],["FieldNormsSerializer","The fieldnorms serializer is in charge of the serialization of field norms for all fields."],["FieldNormsWriter","The `FieldNormsWriter` is in charge of tracking the fieldnorm byte of each document for each field with field norms."]]});

View File

@@ -1,61 +1,4 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `FieldNormReader` struct in crate `tantivy`.">
<meta name="keywords" content="rust, rustlang, rust-lang, FieldNormReader">
<title>tantivy::fieldnorm::FieldNormReader - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css"
id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</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 FieldNormReader</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.open">open</a><a href="#method.fieldnorm">fieldnorm</a><a href="#method.fieldnorm_id">fieldnorm_id</a><a href="#method.id_to_fieldnorm">id_to_fieldnorm</a><a href="#method.fieldnorm_to_id">fieldnorm_to_id</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'>fieldnorm</a></p><script>window.sidebarCurrent = {name: 'FieldNormReader', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</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'>fieldnorm</a>::<wbr><a class="struct" href=''>FieldNormReader</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#23-25' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct FieldNormReader { /* fields omitted */ }</pre></div><div class='docblock'><p>Reads the fieldnorm associated to a document.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `FieldNormReader` struct in crate `tantivy`."><meta name="keywords" content="rust, rustlang, rust-lang, FieldNormReader"><title>tantivy::fieldnorm::FieldNormReader - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</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 FieldNormReader</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.open">open</a><a href="#method.fieldnorm">fieldnorm</a><a href="#method.fieldnorm_id">fieldnorm_id</a><a href="#method.id_to_fieldnorm">id_to_fieldnorm</a><a href="#method.fieldnorm_to_id">fieldnorm_to_id</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'>fieldnorm</a></p><script>window.sidebarCurrent = {name: 'FieldNormReader', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press S to search, ? for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></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'>fieldnorm</a>::<wbr><a class="struct" href=''>FieldNormReader</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#22-24' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct FieldNormReader { /* fields omitted */ }</pre></div><div class='docblock'><p>Reads the fieldnorm associated to a document.
The fieldnorm represents the length associated to
a given Field of a given document.</p>
<p>This metric is important to compute the score of a
@@ -73,85 +16,21 @@ in a very short array.</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/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</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/fieldnorm/reader.rs.html#27-69' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.open' class="method"><span id='open.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.open' class='fnname'>open</a>(data: <a class="enum" href="../../tantivy/directory/enum.ReadOnlySource.html" title="enum tantivy::directory::ReadOnlySource">ReadOnlySource</a>) -&gt; Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#30-34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Opens a field norm reader given its data source.</p>
</div><h4 id='method.fieldnorm' class="method"><span id='fieldnorm.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm' class='fnname'>fieldnorm</a>(&amp;self, doc_id: <a class="type" href="../../tantivy/type.DocId.html" title="type tantivy::DocId">DocId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#45-48' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the <code>fieldnorm</code> associated to a doc id.
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</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/fieldnorm/reader.rs.html#26-65' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.open' class="method"><span id='open.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.open' class='fnname'>open</a>(data: <a class="enum" href="../../tantivy/directory/enum.ReadOnlySource.html" title="enum tantivy::directory::ReadOnlySource">ReadOnlySource</a>) -&gt; Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#28-30' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Opens a field norm reader given its data source.</p>
</div><h4 id='method.fieldnorm' class="method"><span id='fieldnorm.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm' class='fnname'>fieldnorm</a>(&amp;self, doc_id: <a class="type" href="../../tantivy/type.DocId.html" title="type tantivy::DocId">DocId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#41-44' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the <code>fieldnorm</code> associated to a doc id.
The fieldnorm is a value approximating the number
of tokens in a given field of the <code>doc_id</code>.</p>
<p>It is imprecise, and always lower than the actual
number of tokens.</p>
<p>The fieldnorm is effectively decoded from the
<code>fieldnorm_id</code> by doing a simple table lookup.</p>
</div><h4 id='method.fieldnorm_id' class="method"><span id='fieldnorm_id.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm_id' class='fnname'>fieldnorm_id</a>(&amp;self, doc_id: <a class="type" href="../../tantivy/type.DocId.html" title="type tantivy::DocId">DocId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#52-55' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the <code>fieldnorm_id</code> associated to a document.</p>
</div><h4 id='method.id_to_fieldnorm' class="method"><span id='id_to_fieldnorm.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.id_to_fieldnorm' class='fnname'>id_to_fieldnorm</a>(id: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#59-61' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts a <code>fieldnorm_id</code> into a fieldnorm.</p>
</div><h4 id='method.fieldnorm_to_id' class="method"><span id='fieldnorm_to_id.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm_to_id' class='fnname'>fieldnorm_to_id</a>(fieldnorm: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#66-68' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts a <code>fieldnorm</code> into a <code>fieldnorm_id</code>.
</div><h4 id='method.fieldnorm_id' class="method"><span id='fieldnorm_id.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm_id' class='fnname'>fieldnorm_id</a>(&amp;self, doc_id: <a class="type" href="../../tantivy/type.DocId.html" title="type tantivy::DocId">DocId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#48-51' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the <code>fieldnorm_id</code> associated to a document.</p>
</div><h4 id='method.id_to_fieldnorm' class="method"><span id='id_to_fieldnorm.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.id_to_fieldnorm' class='fnname'>id_to_fieldnorm</a>(id: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#55-57' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts a <code>fieldnorm_id</code> into a fieldnorm.</p>
</div><h4 id='method.fieldnorm_to_id' class="method"><span id='fieldnorm_to_id.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.fieldnorm_to_id' class='fnname'>fieldnorm_to_id</a>(fieldnorm: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/reader.rs.html#62-64' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Converts a <code>fieldnorm</code> into a <code>fieldnorm_id</code>.
(This function is not injective).</p>
</div></div>
<h2 id='synthetic-implementations' class='small-section-header'>
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
</h2>
<div id='synthetic-implementations-list'>
<h3 id='impl-Send' 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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' 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/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "tantivy";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>
<h3 id='impl-Send' 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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' 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/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormReader.html" title="struct tantivy::fieldnorm::FieldNormReader">FieldNormReader</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "tantivy";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@@ -1,132 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `FieldNormsSerializer` struct in crate `tantivy`.">
<meta name="keywords" content="rust, rustlang, rust-lang, FieldNormsSerializer">
<title>tantivy::fieldnorm::FieldNormsSerializer - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css"
id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</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 FieldNormsSerializer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.from_write">from_write</a><a href="#method.serialize_field">serialize_field</a><a href="#method.close">close</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'>fieldnorm</a></p><script>window.sidebarCurrent = {name: 'FieldNormsSerializer', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</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'>fieldnorm</a>::<wbr><a class="struct" href=''>FieldNormsSerializer</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#8-10' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct FieldNormsSerializer { /* fields omitted */ }</pre></div>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `FieldNormsSerializer` struct in crate `tantivy`."><meta name="keywords" content="rust, rustlang, rust-lang, FieldNormsSerializer"><title>tantivy::fieldnorm::FieldNormsSerializer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</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 FieldNormsSerializer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.from_write">from_write</a><a href="#method.serialize_field">serialize_field</a><a href="#method.close">close</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'>fieldnorm</a></p><script>window.sidebarCurrent = {name: 'FieldNormsSerializer', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press S to search, ? for more options…" type="search"><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></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'>fieldnorm</a>::<wbr><a class="struct" href=''>FieldNormsSerializer</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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#9-11' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct FieldNormsSerializer { /* fields omitted */ }</pre></div><div class='docblock'><p>The fieldnorms serializer is in charge of
the serialization of field norms for all fields.</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/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</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/fieldnorm/serializer.rs.html#12-36' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_write' class="method"><span id='from_write.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_write' class='fnname'>from_write</a>(write: <a class="type" href="../../tantivy/directory/type.WritePtr.html" title="type tantivy::directory::WritePtr">WritePtr</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#15-21' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Constructor</p>
</div><h4 id='method.serialize_field' class="method"><span id='serialize_field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize_field' class='fnname'>serialize_field</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;fieldnorms_data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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><br>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#24-29' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.close' class="method"><span id='close.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.close' class='fnname'>close</a>(self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#31-34' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div>
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</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/fieldnorm/serializer.rs.html#13-34' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_write' class="method"><span id='from_write.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_write' class='fnname'>from_write</a>(write: <a class="type" href="../../tantivy/directory/type.WritePtr.html" title="type tantivy::directory::WritePtr">WritePtr</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#15-19' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Constructor</p>
</div><h4 id='method.serialize_field' class="method"><span id='serialize_field.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.serialize_field' class='fnname'>serialize_field</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: <a class="struct" href="../../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;fieldnorms_data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</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><br>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#22-27' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Serialize the given field</p>
</div><h4 id='method.close' class="method"><span id='close.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.close' class='fnname'>close</a>(self) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/tantivy/fieldnorm/serializer.rs.html#30-33' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Clean up / flush / close</p>
</div></div>
<h2 id='synthetic-implementations' class='small-section-header'>
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
</h2>
<div id='synthetic-implementations-list'>
<h3 id='impl-Send' 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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' 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/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "tantivy";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>
<h3 id='impl-Send' 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/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' 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/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../tantivy/fieldnorm/struct.FieldNormsSerializer.html" title="struct tantivy::fieldnorm::FieldNormsSerializer">FieldNormsSerializer</a></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "tantivy";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -98,6 +98,15 @@ 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>

View File

@@ -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."],["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."],["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."]]});

View File

@@ -36,7 +36,7 @@ declared as a fast field in the schema.</p>
May panick if the field is not a multivalued fastfield of the type <code>Item</code>.</p>
</div><h4 id='method.bytes_fast_field_reader' class="method"><span id='bytes_fast_field_reader.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.bytes_fast_field_reader' class='fnname'>bytes_fast_field_reader</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a><br>) -&gt; <a class="type" href="../tantivy/fastfield/type.Result.html" title="type tantivy::fastfield::Result">Result</a>&lt;<a class="struct" href="../tantivy/fastfield/struct.BytesFastFieldReader.html" title="struct tantivy::fastfield::BytesFastFieldReader">BytesFastFieldReader</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#153-167' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Accessor to the <code>BytesFastFieldReader</code> associated to a given <code>Field</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>(&amp;self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -&gt; <a class="type" href="../tantivy/type.Result.html" title="type tantivy::Result">Result</a>&lt;<a class="struct" href="../tantivy/fastfield/struct.FacetReader.html" title="struct tantivy::fastfield::FacetReader">FacetReader</a>&gt;</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../src/tantivy/core/segment_reader.rs.html#170-191' 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>(&amp;self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -&gt; 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#201-212' 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>(&amp;self, field: <a class="struct" href="../tantivy/schema/struct.Field.html" title="struct tantivy::schema::Field">Field</a>) -&gt; <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#201-212' 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>