LuceneDocument

From Catglobe Wiki
Revision as of 09:48, 18 May 2017 by Nguyenduyan (talk | contribs) (Created page with "{{CGscriptClass_Template |Name=<nowiki>LuceneDocument</nowiki> |Description=<nowiki>Document to search for given the fields it contains</nowiki> |Constructors= {{CGscriptConst...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

LuceneDocument



Document to search for given the fields it contains

Constructors

  • (string id "Id of document") - Instanciate new document

Methods

  • 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
  • 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
  • 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
  • string ToString() - The string representation of the object.

Properties

  • string Explain { get; set; } - Explain why the search found this document
  • string Id { get; } - Id of the document
  • string ObjectTypeName { get; } - The name of the type of object.
  • number ResultScore { get; } - The score generated by Lucene for this search result
  • TypeInformation TypeInformation { get; } - Get information about this class.