Difference between revisions of "LuceneIndexSearcher"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=<nowiki>LuceneIndexSearcher</nowiki> |Description=<nowiki>Find documents</nowiki> |Constructors= {{CGscriptConstructors_Template|Parameters= {{C...")
(Tag: visualeditor-switched)
 
Line 19: Line 19:
 
{{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|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
[[Category:Archive]]

Revision as of 11:50, 1 June 2017

LuceneIndexSearcher



Find documents

Constructors

  • (string name "Name of the index", array columns "The column configuration. This MUST be the same every time every time for the same index, or a new index must be created") - Instanciate searcher

Methods

  • array GetAll(LuceneColumn orderByColumn "Which column to order by", bool orderByDirection "False if ascending", int nrHits "How many results to try to get") - Get all documents
  • array Search(string queryString "Query to search for. See https://lucene.apache.org/core/2_9_4/queryparsersyntax.html", int nrHits "How many results to try to get", bool addExplain "Add explaination. This is also limits nrHits to 10") - Find documents
  • string ToString() - The string representation of the object.

Properties

  • int Hits { get; } - Number of hits found. This may be different than the number of documents returned
  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.