Difference between revisions of "LuceneDocument class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>LuceneDocument</nowiki> |Description=<nowiki>Document to search for given the fields it contains</nowiki> |Constructors= {{CGscriptConst...")
(Tag: visualeditor-switched)
 
 
Line 2: Line 2:
 
|Name=<nowiki>LuceneDocument</nowiki>
 
|Name=<nowiki>LuceneDocument</nowiki>
 
|Description=<nowiki>Document to search for given the fields it contains</nowiki>
 
|Description=<nowiki>Document to search for given the fields it contains</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>id</nowiki>|Description=<nowiki>Id of document</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>id</nowiki>|Description=<nowiki>Id of document</nowiki>}}
Line 22: Line 22:
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>ResultScore</nowiki>|HasGetter=1|Description=<nowiki>The score generated by Lucene for this search result</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>ResultScore</nowiki>|HasGetter=1|Description=<nowiki>The score generated by Lucene for this search result</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}

Latest revision as of 05:43, 2 July 2020

LuceneDocument



Document to search for given the fields it contains

Parent class

Inherits from object

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
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.