@ProviderType
public interface OmniSearchService
SavedSearchHandlerOmniSearchHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LOCATION
Location has 1:1 mapping with a search module.
|
static int |
MIN_LENGTH_FOR_SUGGESTION |
static java.lang.String |
MIN_LENGTH_SUGGESTION_PROPERTY |
static boolean |
SPELLCHECK_REQUIRE |
static java.lang.String |
SPELLCHECK_REQUIRE_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
Resource |
createOrUpdateSavedSearch(ResourceResolver resolver,
java.util.Map<java.lang.String,java.lang.Object> requestParameters)
This function creates a new saved search or updates a existing saved search based on the
parameters provided in predicateMap parameter.
|
boolean |
deleteSavedSearch(ResourceResolver resolver,
java.lang.String location,
java.lang.String path)
This function delete the saved search node existing on the provided path
|
Resource |
getModuleConfiguration(ResourceResolver resolver,
java.lang.String location)
This function will return the configuration
Resource of the
search modules that is registered with OmniSearch. |
java.util.Map<java.lang.String,Resource> |
getModules(ResourceResolver resolver)
This function will return all search modules and their configuration
that are registered with OmniSearch.
|
java.util.Iterator<Resource> |
getSavedSearches(ResourceResolver resolver,
java.lang.String location,
long limit,
long offset)
This function returns the list of saved searches for the particular module that is register with
omnisearch and has
SavedSearchHandler implemented |
java.util.Map<java.lang.String,java.lang.String> |
getSavedSearchParameters(ResourceResolver resolver,
java.lang.String location,
java.lang.String path)
This function returns the details of saved
Query parameters for the particular saved search. |
java.util.Map<java.lang.String,SearchResult> |
getSearchResults(ResourceResolver resolver,
java.util.Map<java.lang.String,?> predicateParameters,
long limit,
long offset)
This function returns the search result for OmniSearch.
|
java.util.Map<java.lang.String,SuggestionResult> |
getSuggestions(ResourceResolver resolver,
I18n i18n,
java.lang.String term,
java.lang.String location)
This function will return suggestions for omnisearch.
|
static final java.lang.String LOCATION
location in
search request parameter, can specify particular search module to search.
i.e. if location = "x", then omnisearch would only search module that has ID = "x"OmniSearchHandler.getID(),
Constant Field Valuesstatic final java.lang.String MIN_LENGTH_SUGGESTION_PROPERTY
static final java.lang.String SPELLCHECK_REQUIRE_PROPERTY
static final int MIN_LENGTH_FOR_SUGGESTION
static final boolean SPELLCHECK_REQUIRE
java.util.Map<java.lang.String,SearchResult> getSearchResults(ResourceResolver resolver, java.util.Map<java.lang.String,?> predicateParameters, long limit, long offset)
predicateParamters, it could contain results from multiple
search modules or one of the search module.
If user does not have access to any module, that module will
not be present in search Results.resolver - ResourceResolver instancepredicateParameters - Map of parameters this should be in format of <String, String> or <String, String[]>limit - number of result on a pageoffset - pffset for next page result @returnMap with Key as location @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATION ,
and Value as SearchResult.java.util.Map<java.lang.String,SuggestionResult> getSuggestions(ResourceResolver resolver, I18n i18n, java.lang.String term, java.lang.String location)
Map with key as String
and Value as SuggestionResult
If user does not have access to any module, that module will
not be present in search Results.resolver - ResourceResolver instancei18n - I18n instanceterm - text term for which suggestions are requirelocation - this is unique id for each module @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATION.java.util.Map<java.lang.String,Resource> getModules(ResourceResolver resolver)
resolver - ResourceResolver instancelocation and value as configuration resourceOmniSearchHandler.getModuleConfig(org.apache.sling.api.resource.ResourceResolver)Resource getModuleConfiguration(ResourceResolver resolver, java.lang.String location)
Resource of the
search modules that is registered with OmniSearch.resolver - ResourceResolver instancelocation - this is unique id for each module @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATION.java.util.Iterator<Resource> getSavedSearches(ResourceResolver resolver, java.lang.String location, long limit, long offset) throws OmniSearchException
SavedSearchHandler implementedresolver - ResourceResolver instancelocation - this is unique id for each module @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATION.limit - number of result on a pageoffset - offset for next page resultIterator of Resource of nodes of saved search for the module.OmniSearchException - instance of OmniSearchException which provide error from the modulejava.util.Map<java.lang.String,java.lang.String> getSavedSearchParameters(ResourceResolver resolver, java.lang.String location, java.lang.String path) throws OmniSearchException
Query parameters for the particular saved search.resolver - ResourceResolver instancelocation - this is unique id for each module @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATIONpath - path of the node of saved search, from which parameters of saved search Query requiredMap containing parameters of the QueryOmniSearchException - instance of OmniSearchException which provide error from the moduleResource createOrUpdateSavedSearch(ResourceResolver resolver, java.util.Map<java.lang.String,java.lang.Object> requestParameters) throws OmniSearchException
resolver - ResourceResolver instancerequestParameters - Map of the parameters in format <String, String> or <String, String[]>
containing all parameters that needed to be saved as Query parameterResourceResolver instanceOmniSearchException - instance of OmniSearchException which provide error from the moduleboolean deleteSavedSearch(ResourceResolver resolver, java.lang.String location, java.lang.String path) throws OmniSearchException
resolver - ResourceResolver instancelocation - this is unique id for each module @see com.adobe.granite.omnisearch.api.core.OmniSearchService#LOCATIONpath - path of the node of saved search to deleteOmniSearchException - instance of OmniSearchException which provide error from the moduleCopyright © 2010 - 2023 Adobe. All Rights Reserved