public abstract class AbstractOmniSearchHandler extends java.lang.Object implements OmniSearchHandler
AbstractOmniSearchHandler is an abstract class
which other can extend to provide implemenation of OmniSearchHandler
If any Module implements OmniSearchHandler using AbstractOmniSearchHandler ,
It needs to create contentNode under path METADATA_PATH. And provide all the property details in that Node.
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
METADATA_PATH |
| Constructor and Description |
|---|
AbstractOmniSearchHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(ResourceResolver resolver)
This function clear the predicateSuggestionList and remove all the eventListeners.
|
PredicateSuggestion |
getLocationSuggestion(ResourceResolver resolver,
I18n i18n,
java.lang.String searchTerm) |
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 searchTerm)
This function provide List of Predicates that matched to current
request parameters.
|
Query |
getSpellCheckQuery(ResourceResolver resolver,
java.lang.String searchTerm)
This function returns
Query that provides spell check suggestions
based on parameters provide in the request. |
Query |
getSuggestionQuery(ResourceResolver resolver,
java.lang.String searchTerm)
This function returns
Query that provides suggestions
based on parameters provide in the request. |
void |
init(ResourceResolver resolver)
This function updates the contentNodePath.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetID, getResultspublic final java.lang.String METADATA_PATH
public Query getSuggestionQuery(ResourceResolver resolver, java.lang.String searchTerm)
Query that provides suggestions
based on parameters provide in the request. It will look for "fulltext"
paramter in request and "fulltext" parameter will treated as search term.
Based on this search term suggestion query will be created.getSuggestionQuery in interface OmniSearchHandlerresolver - ResourceResolver instancesearchTerm - text term for which suggestions are requireQuery that returns suggestions on executionpublic java.util.List<PredicateSuggestion> getPredicateSuggestions(ResourceResolver resolver, I18n i18n, java.lang.String searchTerm)
PredicateSuggestion
to the search term. Currently predicate suggestion works only if
length of search term is more than MIN_SUGGESTION_REQUIRE_SIZEgetPredicateSuggestions in interface OmniSearchHandlerresolver - ResourceResolver instancei18n - I18n instancesearchTerm - text term for which suggestions are require @return List of PredicateSuggestionList of Predicatespublic Query getSpellCheckQuery(ResourceResolver resolver, java.lang.String searchTerm)
Query that provides spell check suggestions
based on parameters provide in the request. It will look for "fulltext"
paramter in request and "fulltext" parameter will treated as search term.
Based on this search term spell check query will be created.getSpellCheckQuery in interface OmniSearchHandlerresolver - ResourceResolver instancesearchTerm - text term for which suggestions are requireQuery that returns spell check suggestion on execution.public Resource getModuleConfig(ResourceResolver resolver)
OmniSearchHandleritemCardType
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.getModuleConfig in interface OmniSearchHandlerresolver - ResourceResolver instanceResource of content Nodepublic PredicateSuggestion getLocationSuggestion(ResourceResolver resolver, I18n i18n, java.lang.String searchTerm)
public void init(ResourceResolver resolver)
AbstractOmniSearchHandler
It also apply a event at Node at contentNodePath and _predicatePath so that
at any change on this location will triggers all the update again.
It usually called on activation of OmniSearchHandler or on event from
implementation of OmniSearchHandlerresolver - ResourceResolver instancepublic void destroy(ResourceResolver resolver)
OmniSearchHandlerresolver - ResourceResolver instance"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"