| <!DOCTYPE html> |
| <!--[if IE]><![endif]--> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Namespace Lucene.Net.Search.Suggest |
| | Apache Lucene.NET 4.8.0-beta00010 Documentation </title> |
| <meta name="viewport" content="width=device-width"> |
| <meta name="title" content="Namespace Lucene.Net.Search.Suggest |
| | Apache Lucene.NET 4.8.0-beta00010 Documentation "> |
| <meta name="generator" content="docfx 2.56.0.0"> |
| |
| <link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css"> |
| <meta property="docfx:navrel" content="toc.html"> |
| <meta property="docfx:tocrel" content="suggest/toc.html"> |
| |
| <meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/"> |
| |
| </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="/"> |
| <img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/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"> |
| <ul class="level0 breadcrumb"> |
| <li> |
| <a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a> |
| <span id="breadcrumb"> |
| <ul class="breadcrumb"> |
| <li></li> |
| </ul> |
| </span> |
| </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.Search.Suggest"> |
| |
| <h1 id="Lucene_Net_Search_Suggest" data-uid="Lucene.Net.Search.Suggest" class="text-break">Namespace Lucene.Net.Search.Suggest |
| </h1> |
| <div class="markdown level0 summary"><!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <p>Support for Autocomplete/Autosuggest</p> |
| </div> |
| <div class="markdown level0 conceptual"></div> |
| <div class="markdown level0 remarks"></div> |
| <h3 id="classes">Classes |
| </h3> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.BufferedInputIterator.html">BufferedInputIterator</a></h4> |
| <section><p>This wrapper buffers incoming elements.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.BufferingTermFreqIteratorWrapper.html">BufferingTermFreqIteratorWrapper</a></h4> |
| <section><p>This wrapper buffers incoming elements.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.DocumentDictionary.html">DocumentDictionary</a></h4> |
| <section><p><p> |
| Dictionary with terms, weights, payload (optional) and contexts (optional) |
| information taken from stored/indexed fields in a Lucene index. |
| </p> |
| <strong>NOTE:</strong> |
| <ul><li> |
| The term and (optionally) payload fields have to be |
| stored |
| </li><li> |
| The weight field can be stored or can be a <a class="xref" href="http://localhost:8080/api/core/Lucene.Net.Index.NumericDocValues.html">NumericDocValues</a>. |
| If the weight field is not defined, the value of the weight is <code>0</code> |
| </li><li> |
| if any of the term or (optionally) payload fields supplied |
| do not have a value for a document, then the document is |
| skipped by the dictionary |
| </li></ul></p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.DocumentDictionary.DocumentInputIterator.html">DocumentDictionary.DocumentInputIterator</a></h4> |
| <section><p>Implements <a class="xref" href="Lucene.Net.Search.Suggest.IInputIterator.html">IInputIterator</a> from stored fields. </p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.DocumentValueSourceDictionary.html">DocumentValueSourceDictionary</a></h4> |
| <section><p> |
| Dictionary with terms and optionally payload information |
| taken from stored fields in a Lucene index. Similar to |
| <a class="xref" href="Lucene.Net.Search.Suggest.DocumentDictionary.html">DocumentDictionary</a>, except it obtains the weight |
| of the terms in a document based on a <span class="xref">Lucene.Net.Queries.Function.ValueSource</span>. |
| </p> |
| <strong>NOTE:</strong> |
| <ul><li> |
| The term and (optionally) payload fields have to be |
| stored |
| </li><li> |
| if the term or (optionally) payload fields supplied |
| do not have a value for a document, then the document is |
| rejected by the dictionary |
| </li></ul> |
| <p> |
| In practice the <span class="xref">Lucene.Net.Queries.Function.ValueSource</span> will likely be obtained |
| using the lucene expression module. The following example shows |
| how to create a <span class="xref">Lucene.Net.Queries.Function.ValueSource</span> from a simple addition of two |
| fields: |
| <pre><code> Expression expression = JavascriptCompiler.Compile("f1 + f2"); |
| SimpleBindings bindings = new SimpleBindings(); |
| bindings.Add(new SortField("f1", SortField.Type_e.LONG)); |
| bindings.Add(new SortField("f2", SortField.Type_e.LONG)); |
| ValueSource valueSource = expression.GetValueSource(bindings);</code></pre> |
| </p> |
| |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.EmptyInputIterator.html">EmptyInputIterator</a></h4> |
| <section><p>Singleton <a class="xref" href="Lucene.Net.Search.Suggest.IInputIterator.html">IInputIterator</a> that iterates over 0 BytesRefs.</p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.FileDictionary.html">FileDictionary</a></h4> |
| <section><p>Dictionary represented by a text file.</p> |
| <p>Format allowed: 1 entry per line:</p> |
| <p>An entry can be: </p> |
| <ol><li>suggestion</li><li>suggestion <span class="xref">Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter</span> weight</li><li>suggestion <span class="xref">Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter</span> weight <span class="xref">Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter</span> payload</li></ol> |
| where the default <span class="xref">Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter</span> is <a class="xref" href="Lucene.Net.Search.Suggest.FileDictionary.html#Lucene_Net_Search_Suggest_FileDictionary_DEFAULT_FIELD_DELIMITER">DEFAULT_FIELD_DELIMITER</a> (a tab) |
| <p> |
| <strong>NOTE:</strong> |
| <ol><li>In order to have payload enabled, the first entry has to have a payload</li><li>If the weight for an entry is not specified then a value of 1 is used</li><li>A payload cannot be specified without having the weight specified for an entry</li><li>If the payload for an entry is not specified (assuming payload is enabled) |
| then an empty payload is returned</li><li>An entry cannot have more than two <span class="xref">Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter</span>s</li></ol> |
| </p> |
| <code>Example:</code><p> |
| word1 word2 TAB 100 TAB payload1<p> |
| word3 TAB 101<p> |
| word4 word3 TAB 102<p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.InMemorySorter.html">InMemorySorter</a></h4> |
| <section><p>An <a class="xref" href="Lucene.Net.Search.Suggest.Fst.IBytesRefSorter.html">IBytesRefSorter</a> that keeps all the entries in memory.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div><div class="lucene-block lucene-internal">This is a Lucene.NET INTERNAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.InputIteratorWrapper.html">InputIteratorWrapper</a></h4> |
| <section><p>Wraps a <span class="xref">Lucene.Net.Util.IBytesRefIterator</span> as a suggester <a class="xref" href="Lucene.Net.Search.Suggest.IInputIterator.html">IInputIterator</a>, with all weights |
| set to <code>1</code> and carries no payload</p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.Lookup.html">Lookup</a></h4> |
| <section><p>Simple Lookup interface for <span class="xref">System.String</span> suggestions.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.Lookup.LookupPriorityQueue.html">Lookup.LookupPriorityQueue</a></h4> |
| <section><p>A <span class="xref">Lucene.Net.Util.PriorityQueue<T></span> collecting a fixed size of high priority <a class="xref" href="Lucene.Net.Search.Suggest.Lookup.LookupResult.html">Lookup.LookupResult</a>s.</p> |
| </section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.Lookup.LookupResult.html">Lookup.LookupResult</a></h4> |
| <section><p>Result of a lookup.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.SortedInputIterator.html">SortedInputIterator</a></h4> |
| <section><p>This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.SortedTermFreqIteratorWrapper.html">SortedTermFreqIteratorWrapper</a></h4> |
| <section><p>This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.UnsortedInputIterator.html">UnsortedInputIterator</a></h4> |
| <section><p>This wrapper buffers the incoming elements and makes sure they are in |
| random order.</p> |
| <div class="lucene-block lucene-experimental">This is a Lucene.NET EXPERIMENTAL API, use at your own risk</div></section> |
| <h3 id="interfaces">Interfaces |
| </h3> |
| <h4><a class="xref" href="Lucene.Net.Search.Suggest.IInputIterator.html">IInputIterator</a></h4> |
| <section><p>Interface for enumerating term,weight,payload triples for suggester consumption; |
| currently only <a class="xref" href="Lucene.Net.Search.Suggest.Analyzing.AnalyzingSuggester.html">AnalyzingSuggester</a>, <a class="xref" href="Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.html">FuzzySuggester</a> |
| and <a class="xref" href="Lucene.Net.Search.Suggest.Analyzing.AnalyzingInfixSuggester.html">AnalyzingInfixSuggester</a> support payloads.</p> |
| </section> |
| </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/blob/docs/4.8.0-beta00010/src/Lucene.Net.Suggest/Suggest/package.md/#L2" class="contribution-link">Improve this Doc</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="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script> |
| </body> |
| </html> |