Configure Standard CMS Document Search
Some behavior of the standard document search in Bloomreach Experience Manager is configurable.
Number of results, minimal length for wildcarding
The plugin org.hippoecm.frontend.plugins.cms.browse.section.SearchingSectionPlugin, for documents configured at at /hippo:configuration/hippo:frontend/cms/cms-tree-views/documents/sectionPlugin supports these optional configuration properties:
Property | Description | Default |
result.limit | The search limit, i.e. the maximum number of results | 300 |
wildcarded.minimal.length |
The minimal length a search term must have before wildcarding is applied. Values lower than 3 will not be accepted. | 3 |
The SearchingSectionPlugin is also configurable at sibling locations below /hippo:configuration/hippo:frontend/cms/cms-tree-views for assets, images and document types (configuration).
Limiting matching document types
By default, only documents will be searched. The set of searched document types can also be customized.
To configure the searched primary types in the document browse tab, on version 15.6 and up:
-
At node /hippo:configuration/hippo:frontend/cms/cms-tree-views/documents, add value primaryTypes to existing multi valued property frontend:properties .
-
At node /hippo:configuration/hippo:frontend/cms/cms-browser/documentsTreeLoader/cluster.config, add a multi-valued string property primaryNodetypes and add primary document types to include in the search.
Below version 15.6, 'nodetypes' configuration is used:
-
At node /hippo:configuration/hippo:frontend/cms/cms-browser/documentsTreeLoader/cluster.config, add a multi-valued string property nodetypes and add primary document types to include in the search.
The search box in the images and assets tab can be configured similarly at sibling locations below imagesTreeLoader and assetsTreeLoader.
Lucene Analyzer
Each token entered in the search box is interpreted by the tokenizer used by the Lucene analyzer. By default, Bloomreach Experience Manager uses the StandardAnalyzer, which uses the StandardTokenizer. This tokenizer has the following behavior:
-
Splits words at punctuation characters, removing punctuation. However, a dot that's not followed by whitespace is considered part of a token.
-
Splits words at hyphens, unless there's a number in the token, in which case the whole token is interpreted as a product number and is not split.
-
Recognizes email addresses and internet hostnames as one token.
As a result, hyphens cannot be searched for, unless the word containing a hyphen also contains a number. For example, searching for "foo-bar" is not possible, but searching for "foo-bar-5" is. However, it is possible to search for parts of a word after a hyphen. For example, searching "bar" will match documents containing "foo-bar".
Punctiation cannot be searched for either, except for dots within words. For example, searching for "foo,bar" is not possible, but searching for "foo.bar" is.
Note that it is possible to configure a different Lucene analyzer.