Gentics Search Functionality Documentation

Here you can find documentation about how to configure the search feature of the Portlets


Generally the search functionality consists of two parts:

1. Index the published contents of the CMS

For indexing the existing content there are a lot of configuration options in the Gentics Content Connector Wiki. The indexing servlet can be found in the web.xml file of the Portlet.Suite, named indexer.

By default the Gentics Portlet.Suite indexes your content. See the file

{youconfigpath}/rest/indexer.properties

where the index configuration is located.

2. Query and Display search results

Search results are displayed in the Gentics Content Portlet

The Gentics Content Connector request processor and other content highlighting features can be configured in the file

{youconfigpath}/rest/searchresult.properties

If you got multiple content portlets and wish different search result configurations you can specify a unique path to a searchresult properties file. See the configuration parameters.

In Order to do custom queries to the index, there can be configured the searchtermbuilder.template and the searchtermbuilder.parameters. Please check the following configuration options:

Portlet Search Configuration

Please append those search result parameters in your content portlet porperties file. More available content portlet properties here

Parameter Type Description
searchconfigfilename String File name of the search result Content Connector location. For more information about the search result configuration options please look here. Defaults to searchresult.
searchtermbuilder.class Class(String) Configurable class for the search term builder. Defaults to SearchStringBuilderImpl
searchtermbuilder.parameters List (String, comma separated) Configurable List of variable parameters that can be set via the search request URL
searchtermbuilder.escapeparameters Boolean (String: true, false) Boolean value, can be set to true, if the parameters arrived from the request should be escaped with Lucene`s QueryParser.html#escape(java.lang.String). Defaults to false
searchtermbuilder.template String Template for the search term builder that will be used as search filter, evaluated as Velocity template with the searchtermbuilder.parameters in context.
Demo configuration
...
searchtermbuilder.class=com.gentics.cr.util.search.SearchStringBuilderImpl
searchtermbuilder.escapeparameters=false
searchtermbuilder.parameters=content,node_id
searchtermbuilder.template=content:"$content" AND node_id:$node_id
...

E.g. a search request with following parameters:

...&content=testing&node_id=1...

will result in this lucene query string:

content:"testing" AND node_id:1

For more detailed information about lucene query language please refer to this page.

Note: For in depth configuration of the lucene indexer and the lucene request processor (querying the index) please consult a lucene index specialist. Please dont hesitate to contact a member of the project team.