LuceneFastDocument class
Revision as of 05:39, 2 July 2020 by Administrator (talk | contribs)
LuceneFastDocument
Document to used for fast indexing
Parent class
Inherits from LuceneDocument
Constructors
- (array fields "Fields that needs to be stored for this document", array storeValues "If true, the value for the given index can be extracted from the search result") - Initialize fast document for adding in loop. The doc instance can be reused in the loop for less memory usage and faster processing. Notice this sets some fields to empty or 0, where as the non-fast version doesnt include them in document at all
Methods
- (From LuceneDocument) Empty AddField(LuceneColumn type "Which column to store value in", object value "Value to save", bool storeValue "If true, the value can be extracted from the search result") - Add a new field to the document. Multiple calls are valid for the same column, and it is not necessary to add values for all columns
- (From LuceneDocument) object GetField(LuceneColumn type "Which column to get value from") - Get the values for a given field. Only valid if storeValue was true when updating the document
- (From LuceneDocument) array GetFields(LuceneColumn type "Which column to get values from") - Get the values for a given field. Only valid if storeValue was true when updating the document
- Empty Reset(string id "Id") - Reset and set a new Id. Must be called first in any iteration
- Empty SetField(int fieldIndex "Index of which field to set value on", object value "Value to save") - Set a new field to the document. Multiple calls are valid for the same column, and it is not necessary to add values for all columns
- (From LuceneDocument) string ToString() - The string representation of the object.
Properties
- (From LuceneDocument) string Explain { get; set; } - Explain why the search found this document
- (From LuceneDocument) string Id { get; } - Id of the document
- string ObjectTypeName { get; } - The name of the type of object.
- (From LuceneDocument) number ResultScore { get; } - The score generated by Lucene for this search result
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Note
LuceneFastDocument should only have 1 constructor, the other constructors are not valid