Difference between revisions of "LuceneIndexCreator class"
Nguyenduyan (talk | contribs) (Created page with "{{CGscriptClass_Template |Name=<nowiki>LuceneIndexCreator</nowiki> |Description=<nowiki>Creates and updates lucene indexes to help find things</nowiki> |Constructors= {{CGscri...") (Tag: visualeditor-switched) |
Nguyenduyan (talk | contribs) |
||
Line 3: | Line 3: | ||
|Description=<nowiki>Creates and updates lucene indexes to help find things</nowiki> | |Description=<nowiki>Creates and updates lucene indexes to help find things</nowiki> | ||
|Constructors= | |Constructors= | ||
− | {{CGscriptConstructors_Template | + | {{CGscriptConstructors_Template|Description=<nowiki>Instanciate index creator to manipulate index</nowiki>}} |
− | |||
− | |Description=<nowiki>Instanciate index creator to | ||
|Methods= | |Methods= | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>DeleteIds</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>DeleteIds</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=array|Name=<nowiki>documentsIds</nowiki>|Description=<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>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>documentsIds</nowiki>|Description=<nowiki>Document ids to delete</nowiki>}} |
− | |Description=<nowiki>Delete documents from index | + | |Description=<nowiki>Delete documents from index</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Destroy</nowiki>|Description=<nowiki>Delete all files associated with the index</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Destroy</nowiki>|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>}} | ||
+ | |Description=<nowiki>Delete all files associated with the index</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>|Description=<nowiki>The string representation of the object.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateOrAddDocuments</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateOrAddDocuments</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=array|Name=<nowiki>documents</nowiki>|Description=<nowiki>Documents to update/add</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>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>overwriteOldIndex</nowiki>|Description=<nowiki>Overwrite any existing index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>documents</nowiki>|Description=<nowiki>Documents to update/add</nowiki>}} |
− | |Description=<nowiki> | + | |Description=<nowiki>Create, update or overwrite index</nowiki>}} |
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateOrAddDocuments</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>UpdateOrAddDocuments</nowiki>|Parameters= | ||
− | {{CGscriptParameters_Template|Type=array|Name=<nowiki>sourceData</nowiki>|Description=<nowiki>Array to iterate over and call the callback</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=<nowiki>callback</nowiki>|Description=<nowiki>Callback that get each sourceData element as parameter, and must return either a | + | {{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>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>overwriteOldIndex</nowiki>|Description=<nowiki>Overwrite any existing index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>sourceData</nowiki>|Description=<nowiki>Array to iterate over and call the callback</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=<nowiki>callback</nowiki>|Description=<nowiki>Callback that get each sourceData element as parameter, and must return either a LuceneDocument or Empty</nowiki>}} |
− | |Description=<nowiki> | + | |Description=<nowiki>Create, update or overwrite index by stream updates or adding documents, which may vastly reduce memory usage, otherwise similar to overload</nowiki>}} |
|Properties= | |Properties= | ||
{{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|Description=<nowiki>Get information about this class.</nowiki>}} | ||
}} | }} |
Revision as of 08:19, 21 June 2017
LuceneIndexCreator
Creates and updates lucene indexes to help find things
Constructors
- () - Instanciate index creator to manipulate index
Methods
- Empty DeleteIds(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", array documentsIds "Document ids to delete") - Delete documents from index
- Empty Destroy(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") - Delete all files associated with the index
- string ToString() - The string representation of the object.
- Empty UpdateOrAddDocuments(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", bool overwriteOldIndex "Overwrite any existing index", array documents "Documents to update/add") - Create, update or overwrite index
- Empty UpdateOrAddDocuments(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", bool overwriteOldIndex "Overwrite any existing index", array sourceData "Array to iterate over and call the callback", Function callback "Callback that get each sourceData element as parameter, and must return either a LuceneDocument or Empty") - Create, update or overwrite index by stream updates or adding documents, which may vastly reduce memory usage, otherwise similar to overload
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.