Class 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 Lucene.Net.Index.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
Implements
Inherited Members
Namespace: Lucene.Net.Search.Suggest
Assembly: Lucene.Net.Suggest.dll
Syntax
public class DocumentDictionary : IDictionary
Constructors
DocumentDictionary(IndexReader, string, string)
Creates a new dictionary with the contents of the fields named field
for the terms and weightField for the weights that will be used for
the corresponding terms.
Declaration
public DocumentDictionary(IndexReader reader, string field, string weightField)
Parameters
| Type | Name | Description |
|---|---|---|
| IndexReader | reader | |
| string | field | |
| string | weightField |
DocumentDictionary(IndexReader, string, string, string)
Creates a new dictionary with the contents of the fields named field
for the terms, weightField for the weights that will be used for the
the corresponding terms and payloadField for the corresponding payloads
for the entry.
Declaration
public DocumentDictionary(IndexReader reader, string field, string weightField, string payloadField)
Parameters
| Type | Name | Description |
|---|---|---|
| IndexReader | reader | |
| string | field | |
| string | weightField | |
| string | payloadField |
DocumentDictionary(IndexReader, string, string, string, string)
Creates a new dictionary with the contents of the fields named field
for the terms, weightField for the weights that will be used for the
the corresponding terms, payloadField for the corresponding payloads
for the entry and contextsField for associated contexts.
Declaration
public DocumentDictionary(IndexReader reader, string field, string weightField, string payloadField, string contextsField)
Parameters
| Type | Name | Description |
|---|---|---|
| IndexReader | reader | |
| string | field | |
| string | weightField | |
| string | payloadField | |
| string | contextsField |
Fields
m_contextsField
Field to read contexts from
Declaration
protected readonly string m_contextsField
Field Value
| Type | Description |
|---|---|
| string |
m_payloadField
Field to read payload from
Declaration
protected readonly string m_payloadField
Field Value
| Type | Description |
|---|---|
| string |
m_reader
Lucene.Net.Index.IndexReader to load documents from
Declaration
protected readonly IndexReader m_reader
Field Value
| Type | Description |
|---|---|
| IndexReader |
Methods
GetEntryEnumerator()
Returns an enumerator over all the entries.
Declaration
public virtual IInputEnumerator GetEntryEnumerator()
Returns
| Type | Description |
|---|---|
| IInputEnumerator | Enumerator |