Interface QuerySearchPostProcessor
-
@ConsumerType public interface QuerySearchPostProcessor
This interface provides a hook that allows consumer code manipulate the results of theQuerySearchProviderImpl
prior to their return. This is especially useful to populating the `getAdditionalData()` map. To use this interface, create an OSGi Service consumer implementation of this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Results
process(org.apache.sling.api.SlingHttpServletRequest request, com.day.cq.search.Query query, Results results, com.day.cq.search.result.SearchResult searchResult)
This method provides a hook into processing query parameters immediately prior to querying.
-
-
-
Method Detail
-
process
Results process(org.apache.sling.api.SlingHttpServletRequest request, com.day.cq.search.Query query, Results results, com.day.cq.search.result.SearchResult searchResult)
This method provides a hook into processing query parameters immediately prior to querying. This method must return an object that implements theResults
interface. A common use of this method is to populate the results.getAdditionalData() map results.getAdditionalData().put("customKey", createSomeCustomObject(..)); return results;- Parameters:
request
- theSlingHttpServletRequest
object that initiates this search.query
- the QueryBuilder query executed to generate the results and searchResult.results
- the results as created byQuerySearchProviderImpl
searchResult
- the "raw" QueryBuilderSearchResult
object.- Returns:
- the adjusted results object (may be a brand new
Results
obj).
-
-