Difference between revisions of "LuceneIndexSearcher class"

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 2: Line 2:
 
|Name=<nowiki>LuceneIndexSearcher</nowiki>
 
|Name=<nowiki>LuceneIndexSearcher</nowiki>
 
|Description=<nowiki>Find documents</nowiki>
 
|Description=<nowiki>Find documents</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>parentResourceId</nowiki>|Description=<nowiki>Resource to check permissions on</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>columns</nowiki>|Description=<nowiki>The column configuration. This MUST be the same every time every time for the same index, or a new index must be created</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Name of the index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>parentResourceId</nowiki>|Description=<nowiki>Resource to check permissions on</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>columns</nowiki>|Description=<nowiki>The column configuration. This MUST be the same every time every time for the same index, or a new index must be created</nowiki>}}
Line 13: Line 13:
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>queryString</nowiki>|Description=<nowiki>Query to search for. See https://lucene.apache.org/core/2_9_4/queryparsersyntax.html</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>nrHits</nowiki>|Description=<nowiki>How many results to try to get</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>addExplain</nowiki>|Description=<nowiki>Add explaination. This is also limits nrHits to 10</nowiki>}}
 
{{CGscriptParameters_Template|Type=string|Name=<nowiki>queryString</nowiki>|Description=<nowiki>Query to search for. See https://lucene.apache.org/core/2_9_4/queryparsersyntax.html</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>nrHits</nowiki>|Description=<nowiki>How many results to try to get</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>addExplain</nowiki>|Description=<nowiki>Add explaination. This is also limits nrHits to 10</nowiki>}}
 
|Description=<nowiki>Find documents</nowiki>}}
 
|Description=<nowiki>Find documents</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Hits</nowiki>|HasGetter=1|Description=<nowiki>Number of hits found. This may be different than the number of documents returned</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Hits</nowiki>|HasGetter=1|Description=<nowiki>Number of hits found. This may be different than the number of documents returned</nowiki>}}
 
{{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=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 06:46, 2 July 2020

LuceneIndexSearcher



Find documents

Parent class

Inherits from object

Constructors

  • (string name "Name of the index", int parentResourceId "Resource to check permissions on", 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
  • (From object) 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.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.