Show / Hide Table of Contents

    Namespace Lucene.Net.Search.Suggest

    Classes

    BufferedInputIterator

    This wrapper buffers incoming elements.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    BufferingTermFreqIteratorWrapper

    This wrapper buffers incoming elements.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    DocumentDictionary

    Dictionary with terms, weights, payload (optional) and contexts (optional) information taken from stored/indexed fields in a Lucene index.

    NOTE:
    • The term and (optionally) payload fields have to be stored
    • The weight field can be stored or can be a NumericDocValues. If the weight field is not defined, the value of the weight is 0
    • 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

    DocumentDictionary.DocumentInputIterator

    Implements IInputIterator from stored fields.

    DocumentValueSourceDictionary

    Dictionary with terms and optionally payload information taken from stored fields in a Lucene index. Similar to DocumentDictionary, except it obtains the weight of the terms in a document based on a ValueSource.

    NOTE:
    • The term and (optionally) payload fields have to be stored
    • if the term or (optionally) payload fields supplied do not have a value for a document, then the document is rejected by the dictionary

    In practice the ValueSource will likely be obtained using the lucene expression module. The following example shows how to create a ValueSource from a simple addition of two fields:

      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);

    EmptyInputIterator

    Singleton IInputIterator that iterates over 0 BytesRefs.

    FileDictionary

    Dictionary represented by a text file.

    Format allowed: 1 entry per line:

    An entry can be:

    1. suggestion
    2. suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight
    3. suggestion Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter weight Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter payload
    where the default Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiter is DEFAULT_FIELD_DELIMITER (a tab)

    NOTE:

    1. In order to have payload enabled, the first entry has to have a payload
    2. If the weight for an entry is not specified then a value of 1 is used
    3. A payload cannot be specified without having the weight specified for an entry
    4. If the payload for an entry is not specified (assuming payload is enabled) then an empty payload is returned
    5. An entry cannot have more than two Lucene.Net.Search.Suggest.FileDictionary.fieldDelimiters

    Example:

    word1 word2 TAB 100 TAB payload1

    word3 TAB 101

    word4 word3 TAB 102

    InMemorySorter

    An IBytesRefSorter that keeps all the entries in memory. @lucene.experimental

    This is a Lucene.NET INTERNAL API, use at your own risk

    InputIteratorWrapper

    Wraps a IBytesRefIterator as a suggester IInputIterator, with all weights set to 1 and carries no payload

    Lookup

    Simple Lookup interface for System.String suggestions.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    Lookup.LookupPriorityQueue

    A PriorityQueue<T> collecting a fixed size of high priority Lookup.LookupResults.

    Lookup.LookupResult

    Result of a lookup.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    SortedInputIterator

    This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    SortedTermFreqIteratorWrapper

    This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    UnsortedInputIterator

    This wrapper buffers the incoming elements and makes sure they are in random order.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk

    Interfaces

    IInputIterator

    Interface for enumerating term,weight,payload triples for suggester consumption; currently only AnalyzingSuggester, FuzzySuggester and AnalyzingInfixSuggester support payloads.

    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)