Package org.imixs.workflow.engine.index
Class SchemaService
java.lang.Object
org.imixs.workflow.engine.index.SchemaService
The IndexSchemaService provides the index Schema.
The schema is defined by the following properties:
- index.fields - content which will be indexed
- index.fields.analyze - fields indexed as analyzed keyword fields
- index.fields.noanalyze - fields indexed without analyze
- index.fields.store - fields stored in the index
- index.fields.category - fields indexed as categories for a faceted search
- index.operator - default operator
- index.splitwhitespace - split text on whitespace prior to analysis
- Version:
- 1.0
- Author:
- rsoika
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionescapeSearchTerm
(String searchTerm) escapeSearchTerm
(String searchTerm, boolean ignoreBracket) This helper method escapes special characters found in a lucene search term.Returns the Lucene schema configurationgetExtendedSearchTerm
(String sSearchTerm) Returns the extended search term for a given query.Returns the field list defining the default content of the schema.Returns the analyzed field list of the schema.Returns the field list of category fields.Returns the no-analyze field list of the schema.Returns the field list of items stored in the index.Returns a unique list of all fields part of the index schema.normalizeSearchTerm
(String searchTerm) This method normalizes a search term.
-
Field Details
-
ANONYMOUS
- See Also:
-
DEFAULT_SEARCH_FIELD_LIST
-
DEFAULT_NOANALYZE_FIELD_LIST
-
DEFAULT_STORE_FIELD_LIST
-
DEFAULT_CATEGORY_FIELD_LIST
-
-
Constructor Details
-
SchemaService
public SchemaService()
-
-
Method Details
-
getFieldList
Returns the field list defining the default content of the schema. The values of those items are only searchable by fulltext search- Returns:
-
getFieldListAnalyze
Returns the analyzed field list of the schema. The values of those items are searchable by a field search. The values are analyzed.- Returns:
-
getFieldListNoAnalyze
Returns the no-analyze field list of the schema. The values of those items are searchable by field search. The values are not analyzed.- Returns:
-
getFieldListStore
Returns the field list of items stored in the index.- Returns:
-
getUniqueFieldList
Returns a unique list of all fields part of the index schema.- Returns:
-
getFieldListCategory
Returns the field list of category fields.- Returns:
-
getConfiguration
Returns the Lucene schema configuration- Returns:
-
getExtendedSearchTerm
Returns the extended search term for a given query. The search term will be extended with a users roles to test the read access level of each workitem matching the search term.- Parameters:
sSearchTerm
-- Returns:
- extended search term
- Throws:
QueryException
- in case the searchtem is not understandable.
-
escapeSearchTerm
This helper method escapes special characters found in a lucene search term. The method can be used by clients to prepare a search phrase.Special characters are characters that are part of the lucene query syntax
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ /
Clients should use the method normalizeSearchTerm() instead of escapeSearchTerm() to prepare a user input for a lucene search.
- Parameters:
searchTerm
-ignoreBracket
- - if true brackes will not be escaped.- Returns:
- escaped search term
- See Also:
-
escapeSearchTerm
-
normalizeSearchTerm
This method normalizes a search term. The method can be used by clients to prepare a search phrase. The serach term will be lowercased and special characters will be replaced by a blank separatore.g. 'europe/berlin' will be normalized to 'europe berlin'
In case the searchTerm contains numbers the method escapes special characters instead of replacing with a blank:
e.g. 'r-555/333' will be converted into 'r\-555\/333'
Special characters are characters that are part of the lucene query syntax
+ - && || ! ( ) { } [ ] ^ " ~ ? : \ /
- Parameters:
searchTerm
-- Returns:
- normalized search term
-