public interface OmniSearchHandler
OmniSearchHandler
interface i.e. search module Assets, Sites
would need to implement this interface.
OmniSearch allows different modules to register themselves, by implementing this interface.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getID()
This function returns ID of
SuggestionHandler aka Search Module
This ID helps identify the search module uniquely i.e. |
Resource |
getModuleConfig(ResourceResolver resolver)
Every search module will store additional configuration i.e.
|
java.util.List<PredicateSuggestion> |
getPredicateSuggestions(ResourceResolver resolver,
I18n i18n,
java.lang.String term)
This function provide predicate suggestions for the current search term.
|
SearchResult |
getResults(ResourceResolver resolver,
java.util.Map<java.lang.String,java.lang.Object> predicateParameters,
long limit,
long offset)
returns the search results.
|
Query |
getSpellCheckQuery(ResourceResolver resolver,
java.lang.String searchTerm)
This function return the Spell Check suggestion according to the search term.
|
Query |
getSuggestionQuery(ResourceResolver resolver,
java.lang.String term)
This function returns
Query that provides suggestions query for module |
java.lang.String getID()
SuggestionHandler
aka Search Module
This ID helps identify the search module uniquely i.e. assets, sites, projects etc.SuggestionHandler
Query getSuggestionQuery(ResourceResolver resolver, java.lang.String term)
Query
that provides suggestions query for moduleresolver
- ResourceResolver instanceterm
- text term for which suggestions are requireQuery
that returns suggestions on executionjava.util.List<PredicateSuggestion> getPredicateSuggestions(ResourceResolver resolver, I18n i18n, java.lang.String term)
resolver
- ResourceResolver instancei18n
- I18n instanceterm
- text term for which suggestions are requireList
of PredicatesQuery getSpellCheckQuery(ResourceResolver resolver, java.lang.String searchTerm)
resolver
- ResourceResolver instancesearchTerm
- text term for which suggestions are require @return List
of PredicatesResource getModuleConfig(ResourceResolver resolver)
itemCardType
itemListType
to specify configuration that can be used to represent
search module resources i.e. assets, sites, users, groups.
This api returns such a resource that stores the config.
Additionally, this allows ability to control the visibility of particular search module
to a user. If a user does not have access to this resource. OmniSearch will not include this search
module in its searches i.e. suggestions, search etc.resolver
- ResourceResolver instanceResource
of content NodeSearchResult getResults(ResourceResolver resolver, java.util.Map<java.lang.String,java.lang.Object> predicateParameters, long limit, long offset)
resolver
- ResourceResolver
instancepredicateParameters
- search predicate parameter map. Each module is independent to do search
based on existing mechanism i.e. Oak Query enginer, QueryBuilder, some other api i.e
User Manager search.
Map of parameters this should be in format of <String, String> or <String, String[]>limit
- number of result on a pageoffset
- offset/start of resultSearchResult
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"