LuceneIndexCreator class
Revision as of 10:54, 1 June 2017 by 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...")
LuceneIndexCreator
Creates and updates lucene indexes to help find things
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", bool overwriteExisting "If true, overwrite existing index, e.g. if changing column configuration") - Instanciate index creator to create or update index
Methods
- Empty DeleteIds(array documentsIds "Documents to delete") - Delete documents from index. Atleast 1 update is required to make the deletes actually occur
- Empty Destroy() - Delete all files associated with the index
- string ToString() - The string representation of the object.
- Empty UpdateOrAddDocuments(array documents "Documents to update/add") - Update documents in index, or add if not already there. Note this may throw exceptions if called simultaneously on multiple server for the same index. It is therefore recommended it is called from cattask at specific times
- Empty UpdateOrAddDocuments(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 Document or Empty") - Stream updates or adding documents in index, 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.