A configurable request for the cross-application "omni search" used by the admin search box. Create one with SearchManager.newOmniSearchRequest, narrow it down with the fluent excludeType, includeType and applyGroupFilter methods, then pass it to SearchManager.omniSearch or SearchManager.omniSearchAggs to run it. Each active OmniSearchApplication contributes its own query clause and output fields when the request is executed.


Properties

PropertyReturnsDescription
excludedTypesList<String>The item types excluded from the search results, or null if no types have been excluded.
phraseStringThe search phrase this request matches against, already trimmed and lower-cased, or null if no phrase was given.

Methods

applyGroupFilter(boolean b)

Returns: OmniSearchRequest

Sets whether results should be filtered to the current user's groups. Note this flag is currently not applied by the query built in this request.

ParameterDescription
btrue to restrict results to the current user's groups, false to leave them unrestricted

getPhrase()

Returns: String

The search phrase this request matches against, already trimmed and lower-cased, or null if no phrase was given.

getExcludedTypes()

Returns: List<String>

The item types excluded from the search results, or null if no types have been excluded.

excludedTypes(List<String> list)

Returns: OmniSearchRequest

Replaces the full list of item types to exclude from the search results.

ParameterDescription
listthe item types to exclude, replacing any types set previously

excludeType(String s)

Returns: OmniSearchRequest

Adds a single item type to exclude from the search results.

ParameterDescription
sthe item type to exclude

includeType(String s)

Returns: OmniSearchRequest

Adds a single item type to include in the search results. Used together with parseTerms to build the type filter from request parameters.

ParameterDescription
sthe item type to include

parseTerms(Map<String,String> params)

Returns: OmniSearchRequest

Reads item type filters from request parameters named "term-itemType" (types to include) and "exterm-itemType" (types to exclude), as used by URLs like /contentSearch?q=some&term-itemType=module,modulePage, and applies them to this request via includeType and excludeType.

ParameterDescription
paramsthe request parameters to read filter terms from
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.