blob: e055f5f8bd2636a895b75c4be6e753fd8fd9b3a4 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class Lucene40TermVectorsFormat
| Apache Lucene.NET 4.8.0 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class Lucene40TermVectorsFormat
| Apache Lucene.NET 4.8.0 Documentation ">
<meta name="generator" content="docfx 2.47.0.0">
<link rel="shortcut icon" href="../../logo/favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
<meta property="docfx:rel" content="../../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat">
<h1 id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat" class="text-break">Class Lucene40TermVectorsFormat
</h1>
<div class="markdown level0 summary"><p>Lucene 4.0 Term Vectors format.
<p>Term Vector support is an optional on a field by field basis. It consists of
3 files.</p>
<ol><li><a name="tvx" id="tvx"></a>
<p>The Document Index or .tvx file.</p>
<p>For each document, this stores the offset into the document data (.tvd) and
field data (.tvf) files.</p>
<p>DocumentIndex (.tvx) --&gt; Header,&lt;DocumentPosition,FieldPosition&gt;
<sup>NumDocs</sup></p>
<ul><li>Header --&gt; CodecHeader (<a class="xref" href="Lucene.Net.Codecs.CodecUtil.html#Lucene_Net_Codecs_CodecUtil_WriteHeader_Lucene_Net_Store_DataOutput_System_String_System_Int32_">WriteHeader(DataOutput, String, Int32)</a>) </li><li>DocumentPosition --&gt; UInt64 (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteInt64_System_Int64_">WriteInt64(Int64)</a>) (offset in the .tvd file)</li><li>FieldPosition --&gt; UInt64 (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteInt64_System_Int64_">WriteInt64(Int64)</a>) (offset in the .tvf file)</li></ul>
</li><li><a name="tvd" id="tvd"></a>
<p>The Document or .tvd file.</p>
<p>This contains, for each document, the number of fields, a list of the fields
with term vector info and finally a list of pointers to the field information
in the .tvf (Term Vector Fields) file.</p>
<p>The .tvd file is used to map out the fields that have term vectors stored
and where the field information is in the .tvf file.</p>
<p>Document (.tvd) --&gt; Header,&lt;NumFields, FieldNums,
FieldPositions&gt; <sup>NumDocs</sup></p>
<ul><li>Header --&gt; CodecHeader (<a class="xref" href="Lucene.Net.Codecs.CodecUtil.html#Lucene_Net_Codecs_CodecUtil_WriteHeader_Lucene_Net_Store_DataOutput_System_String_System_Int32_">WriteHeader(DataOutput, String, Int32)</a>) </li><li>NumFields --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>FieldNums --&gt; &lt;FieldNumDelta&gt; <sup>NumFields</sup></li><li>FieldNumDelta --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>FieldPositions --&gt; &lt;FieldPositionDelta&gt; <sup>NumFields-1</sup></li><li>FieldPositionDelta --&gt; VLong (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt64_System_Int64_">WriteVInt64(Int64)</a>) </li></ul>
</li><li><a name="tvf" id="tvf"></a>
<p>The Field or .tvf file.</p>
<p>This file contains, for each field that has a term vector stored, a list of
the terms, their frequencies and, optionally, position, offset, and payload
information.</p>
<p>Field (.tvf) --&gt; Header,&lt;NumTerms, Flags, TermFreqs&gt;
<sup>NumFields</sup></p>
<ul><li>Header --&gt; CodecHeader (<a class="xref" href="Lucene.Net.Codecs.CodecUtil.html#Lucene_Net_Codecs_CodecUtil_WriteHeader_Lucene_Net_Store_DataOutput_System_String_System_Int32_">WriteHeader(DataOutput, String, Int32)</a>) </li><li>NumTerms --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>Flags --&gt; Byte (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteByte_System_Byte_">WriteByte(Byte)</a>) </li><li>TermFreqs --&gt; &lt;TermText, TermFreq, Positions?, PayloadData?, Offsets?&gt;
<sup>NumTerms</sup></li><li>TermText --&gt; &lt;PrefixLength, Suffix&gt;</li><li>PrefixLength --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>Suffix --&gt; String (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteString_System_String_">WriteString(String)</a>) </li><li>TermFreq --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>Positions --&gt; &lt;PositionDelta PayloadLength?&gt;<sup>TermFreq</sup></li><li>PositionDelta --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>PayloadLength --&gt; VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) </li><li>PayloadData --&gt; Byte (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteByte_System_Byte_">WriteByte(Byte)</a>) <sup>NumPayloadBytes</sup></li><li>Offsets --&gt; &lt;VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>), VInt (<a class="xref" href="Lucene.Net.Store.DataOutput.html#Lucene_Net_Store_DataOutput_WriteVInt32_System_Int32_">WriteVInt32(Int32)</a>) &gt;<sup>TermFreq</sup></li></ul>
<p>Notes:</p>
<ul><li>Flags byte stores whether this term vector has position, offset, payload.
information stored.</li><li>Term byte prefixes are shared. The PrefixLength is the number of initial
bytes from the previous term which must be pre-pended to a term&apos;s suffix
in order to form the term&apos;s bytes. Thus, if the previous term&apos;s text was &quot;bone&quot;
and the term is &quot;boy&quot;, the PrefixLength is two and the suffix is &quot;y&quot;.</li><li>PositionDelta is, if payloads are disabled for the term&apos;s field, the
difference between the position of the current occurrence in the document and
the previous occurrence (or zero, if this is the first occurrence in this
document). If payloads are enabled for the term&apos;s field, then PositionDelta/2
is the difference between the current and the previous position. If payloads
are enabled and PositionDelta is odd, then PayloadLength is stored, indicating
the length of the payload at the current term position.</li><li>PayloadData is metadata associated with a term position. If
PayloadLength is stored at the current position, then it indicates the length
of this payload. If PayloadLength is not stored, then this payload has the same
length as the payload at the previous position. PayloadData encodes the
concatenated bytes for all of a terms occurrences.</li><li>Offsets are stored as delta encoded VInts. The first VInt is the
startOffset, the second is the endOffset.</li></ul>
</li></ol></p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><a class="xref" href="Lucene.Net.Codecs.TermVectorsFormat.html">TermVectorsFormat</a></div>
<div class="level2"><span class="xref">Lucene40TermVectorsFormat</span></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">System.Object.Equals(System.Object)</span>
</div>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetHashCode()</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.ToString()</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="../Lucene.Net.TestFramework/Lucene.Net.Codecs.Lucene40.html">Lucene.Net.Codecs.Lucene40</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class Lucene40TermVectorsFormat : TermVectorsFormat</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat__ctor.md&amp;value=---%0Auid%3A%20Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsFormat.cs/#L113">View Source</a>
</span>
<a id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat__ctor_" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.#ctor*"></a>
<h4 id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat__ctor" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.#ctor">Lucene40TermVectorsFormat()</h4>
<div class="markdown level1 summary"><p>Sole constructor. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Lucene40TermVectorsFormat()</code></pre>
</div>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsReader_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Index_FieldInfos_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsReader(Lucene.Net.Store.Directory%2CLucene.Net.Index.SegmentInfo%2CLucene.Net.Index.FieldInfos%2CLucene.Net.Store.IOContext)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsFormat.cs/#L117">View Source</a>
</span>
<a id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsReader_" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsReader*"></a>
<h4 id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsReader_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Index_FieldInfos_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsReader(Lucene.Net.Store.Directory,Lucene.Net.Index.SegmentInfo,Lucene.Net.Index.FieldInfos,Lucene.Net.Store.IOContext)">VectorsReader(Directory, SegmentInfo, FieldInfos, IOContext)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override TermVectorsReader VectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a></td>
<td><span class="parametername">directory</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Index.SegmentInfo.html">SegmentInfo</a></td>
<td><span class="parametername">segmentInfo</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Index.FieldInfos.html">FieldInfos</a></td>
<td><span class="parametername">fieldInfos</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.IOContext.html">IOContext</a></td>
<td><span class="parametername">context</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Codecs.TermVectorsReader.html">TermVectorsReader</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Codecs.TermVectorsFormat.html#Lucene_Net_Codecs_TermVectorsFormat_VectorsReader_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Index_FieldInfos_Lucene_Net_Store_IOContext_">TermVectorsFormat.VectorsReader(Directory, SegmentInfo, FieldInfos, IOContext)</a></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Store_IOContext_.md&amp;value=---%0Auid%3A%20Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsWriter(Lucene.Net.Store.Directory%2CLucene.Net.Index.SegmentInfo%2CLucene.Net.Store.IOContext)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsFormat.cs/#L122">View Source</a>
</span>
<a id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsWriter_" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsWriter*"></a>
<h4 id="Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat_VectorsWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Store_IOContext_" data-uid="Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat.VectorsWriter(Lucene.Net.Store.Directory,Lucene.Net.Index.SegmentInfo,Lucene.Net.Store.IOContext)">VectorsWriter(Directory, SegmentInfo, IOContext)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override TermVectorsWriter VectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Store.Directory.html">Directory</a></td>
<td><span class="parametername">directory</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Index.SegmentInfo.html">SegmentInfo</a></td>
<td><span class="parametername">segmentInfo</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Lucene.Net.Store.IOContext.html">IOContext</a></td>
<td><span class="parametername">context</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Codecs.TermVectorsWriter.html">TermVectorsWriter</a></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="Lucene.Net.Codecs.TermVectorsFormat.html#Lucene_Net_Codecs_TermVectorsFormat_VectorsWriter_Lucene_Net_Store_Directory_Lucene_Net_Index_SegmentInfo_Lucene_Net_Store_IOContext_">TermVectorsFormat.VectorsWriter(Directory, SegmentInfo, IOContext)</a></div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Codecs_Lucene40_Lucene40TermVectorsFormat.md&amp;value=---%0Auid%3A%20Lucene.Net.Codecs.Lucene40.Lucene40TermVectorsFormat%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsFormat.cs/#L109" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>