You can link the user's search query with another search query that you have defined in a Java class. The user's search query and the search query in the class are linked using AND.
For example, you can define a search for a specific property value in the class (such as property targetgroup = " public "). The index returns only documents for which this value is set.
Your Java class must be derived from the following class:
com.sapportals.wcm.service.indexmanagement.retrieval.search.DefaultQueryExtender
To connect your Java class to an index, create the queryExtender customer property in index administration. You enter the complete name of the Java class as the value. For more information, see Creating an Index .
The example below shows a Java class that you can use to extend the search queries for an index: