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 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
| Improve this Doc View SourceDocumentDictionary(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 | |
System.String | field | |
System.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 | |
System.String | field | |
System.String | weightField | |
System.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 | |
System.String | field | |
System.String | weightField | |
System.String | payloadField | |
System.String | contextsField |
Fields
| Improve this Doc View Sourcem_contextsField
Field to read contexts from
Declaration
protected readonly string m_contextsField
Field Value
Type | Description |
---|---|
System.String |
m_payloadField
Field to read payload from
Declaration
protected readonly string m_payloadField
Field Value
Type | Description |
---|---|
System.String |
m_reader
IndexReader to load documents from
Declaration
protected readonly IndexReader m_reader
Field Value
Type | Description |
---|---|
IndexReader |
Methods
| Improve this Doc View SourceGetEntryIterator()
Declaration
public virtual IInputIterator GetEntryIterator()
Returns
Type | Description |
---|---|
IInputIterator |