Lucene4 Plug-in (deprecated)

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (13)

View Page History
h3. Search options

* _return.entities_ The {{return.entities}} parameter is removed. Lucene4 always acts as Lucene2 with _return.entities=dedup_ {{return.entities=dedup}}.
* _order.by_ parameter added to allow specifying predicates to sort on
* The {{order.by}} parameter is added to allow specifying predicates to sort.

h2. User's Guide

where *<index-options>* can be a combination of the following options, separated by a semicolon ';':
* stripMarkup=true\|false specifying whether to strip tags from HTML/XML literals (default is false)
* autoUpdate=true\|false specifying whether to keep this index automatically up-to-date (default is true)
* enableSnippets=true\|false specifying whether to enable snippets in this index. As of 2013-12-15, this is a dummy flag and snippets are always enabled. You should generally pass a meaningful value here in case we optimize our implementation later.
* analyzer=<analyzer-class-name> Lucene analyzer to use when indexing literals in this index. Threre are two possibilities here:
** specifying Lucene analyzer class name directly - in that case the analyzer should either have a default constructor or a constructor accepting a single _org.apache.lucene.util.Version_ parameter. If you specify an analyzer that doesn't have one of those constructors the index won't be created
* {{stripMarkup=true\|false}} \- specifying whether to strip tags from HTML/XML literals (*false* by default);
* {{autoUpdate=true\|false}} \- specifying whether to keep the index automatically up-to-date (*true* by default);
* {{enableSnippets=true\|false}} \- specifying whether to enable snippets in this index. (As of 2013-12-15, this is a dummy flag and snippets are *always enabled*. You should generally pass a meaningful value here, in case we optimise our implementation later.)
* {{analyzer=<analyzer-class-name>}} \- specifying which Lucene analyzer to use when indexing literals in this index. There are two options here:
** directly specifying the Lucene analyzer class name - in this case, the analyzer should either have a default constructor or a constructor accepting a single {{org.apache.lucene.util.Version}} parameter. If you specify an analyzer that does not have one of these constructors, the index will not be created.
** specifying a class derived from _com.ontotext.trree.plugin.lucene4.AnalyzerFactory_ {{com.ontotext.trree.plugin.lucene4.AnalyzerFactory}}
* predicates=<comma-separated-list-of-URIs> - only triples with those predicates will be indexed
* {{predicates=<comma-separated-list-of-URIs>}} \- if specified, only triples with these predicates will be listed;
* {{languages=<comma-separated-languages>}} \- if specified, only literals tagged with the listed languages will be indexed;
* types=<comma-separated-list-of-URIs> if specified, a white list of types to index (i.e. will only index entities that have rdf:type equal to one of the specified URIs)
* {{types=<comma-separated-list-of-URIs>}} \- if specified, a white list of types will be indexed (i.e. only entities that have rdf:type equal to one of the specified URIs will be indexed);
* facets=<comma-separated-list-of-URIs> if specified, the listed predicates and their values will be indexed in the facets index
* optionalJoins=<\|-separated-predicate-object-pairs> if specified, a white list of additional optional joins to validate. Supports both URIs and Literals as objects. Literals can include spaces. Sample syntax: _optionallJoins=urn:ontology:predicate,longer value\|urn:ontology:predicate,another longer value_. An entity is only indexed iff for each specified predicate it either has the predicate with one of the specified value or doesn't have the predicate at all. If an entity is indexed, a field for each optional join predicate is created with all values and in the case where the entity doesn't have the predicate - a default value for the optional join predicate specified with *optionalJoinDefaults*. The value is indexed, but not tokenized, so any searches within an optional joins field should match exactly
* {{optionalJoins=<\|-separated-predicate-object-pairs>}} if specified, a white list of additional optional joins to validate. Supports both URIs and Literals as objects. Literals can include spaces. Sample syntax: {code}optionallJoins=urn:ontology:predicate,longer value\|urn:ontology:predicate,another longer value{code}
An entity is only indexed, if for each specified predicate it either has the predicate with one of the specified values, or it does not have the predicate. If an entity is indexed, a field for each optional join predicate is created with all values and in the case where the entity does not have the predicate a default value for the optional join predicate specified with *optionalJoinDefaults*. The value is indexed, but not tokenized, so any searches within an optional joins field should match exactly
* optionalJoinDefaults=<\|-separated-predicate-object-pairs> if specified, provide different default value to index in the field of entities that don't have the optional join predicate at all. The default for all predicates is "OPTIONALJOINDEFAULT"
* sortPredicates=<comma-separated-list-of-URIs> - predicate values that will be used for sorting at search time - only predicates specified here can be passed to \_order.by_.