public interface Indexer<T>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INTERVAL |
Modifier and Type | Method and Description |
---|---|
void |
delete(long companyId,
String uid) |
void |
delete(T object) |
String |
getClassName() |
default long |
getCompanyId() |
Document |
getDocument(T object) |
BooleanFilter |
getFacetBooleanFilter(String className,
SearchContext searchContext) |
BooleanQuery |
getFullQuery(SearchContext searchContext) |
IndexerPostProcessor[] |
getIndexerPostProcessors() |
String[] |
getSearchClassNames() |
String |
getSortField(String orderByCol)
Deprecated.
As of Judson (7.1.x), replaced by
com.liferay.portal.sort.SortFieldBuilder |
default Summary |
getSummary(Document document,
Locale locale,
String snippet) |
Summary |
getSummary(Document document,
String snippet,
javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse) |
boolean |
hasPermission(PermissionChecker permissionChecker,
String entryClassName,
long entryClassPK,
String actionId) |
boolean |
isCommitImmediately() |
boolean |
isFilterSearch()
Return
true if the indexer participates in post-search
result filtering. |
boolean |
isIndexerEnabled() |
boolean |
isPermissionAware()
Returns
true if the indexer adds permission related filters
to the search query prior to execution |
boolean |
isStagingAware() |
boolean |
isVisible(long classPK,
int status) |
void |
postProcessContextBooleanFilter(BooleanFilter contextBooleanFilter,
SearchContext searchContext) |
void |
postProcessContextQuery(BooleanQuery contextQuery,
SearchContext searchContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
postProcessContextBooleanFilter(BooleanFilter,
SearchContext) |
void |
postProcessSearchQuery(BooleanQuery searchQuery,
BooleanFilter fullQueryBooleanFilter,
SearchContext searchContext) |
void |
postProcessSearchQuery(BooleanQuery searchQuery,
SearchContext searchContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
postProcessSearchQuery(BooleanQuery, BooleanFilter,
SearchContext) |
void |
reindex(Collection<T> objects) |
void |
reindex(String[] ids) |
void |
reindex(String className,
long classPK) |
void |
reindex(T object) |
default void |
reindex(T object,
boolean notify) |
Hits |
search(SearchContext searchContext) |
Hits |
search(SearchContext searchContext,
String... selectedFieldNames) |
long |
searchCount(SearchContext searchContext) |
void |
setIndexerEnabled(boolean indexerEnabled) |
static final int DEFAULT_INTERVAL
void delete(long companyId, String uid) throws SearchException
SearchException
@Bufferable void delete(T object) throws SearchException
SearchException
String getClassName()
default long getCompanyId()
Document getDocument(T object) throws SearchException
SearchException
BooleanFilter getFacetBooleanFilter(String className, SearchContext searchContext) throws Exception
Exception
BooleanQuery getFullQuery(SearchContext searchContext) throws SearchException
SearchException
IndexerPostProcessor[] getIndexerPostProcessors()
String[] getSearchClassNames()
@Deprecated String getSortField(String orderByCol)
com.liferay.portal.sort.SortFieldBuilder
default Summary getSummary(Document document, Locale locale, String snippet) throws SearchException
SearchException
Summary getSummary(Document document, String snippet, javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse) throws SearchException
SearchException
boolean hasPermission(PermissionChecker permissionChecker, String entryClassName, long entryClassPK, String actionId) throws Exception
Exception
boolean isCommitImmediately()
boolean isFilterSearch()
true
if the indexer participates in post-search
result filtering.true
if the indexer participates in post-search
result filtering; false
otherwiseSearchResultPermissionFilter
boolean isIndexerEnabled()
boolean isPermissionAware()
true
if the indexer adds permission related filters
to the search query prior to executiontrue
if the indexer adds permission related filters
to the search query prior to execution; false
otherwiseSearchPermissionChecker
boolean isStagingAware()
boolean isVisible(long classPK, int status) throws Exception
Exception
void postProcessContextBooleanFilter(BooleanFilter contextBooleanFilter, SearchContext searchContext) throws Exception
Exception
@Deprecated void postProcessContextQuery(BooleanQuery contextQuery, SearchContext searchContext) throws Exception
postProcessContextBooleanFilter(BooleanFilter,
SearchContext)
Exception
void postProcessSearchQuery(BooleanQuery searchQuery, BooleanFilter fullQueryBooleanFilter, SearchContext searchContext) throws Exception
Exception
@Deprecated void postProcessSearchQuery(BooleanQuery searchQuery, SearchContext searchContext) throws Exception
postProcessSearchQuery(BooleanQuery, BooleanFilter,
SearchContext)
Exception
@Bufferable void reindex(Collection<T> objects) throws SearchException
SearchException
@Bufferable void reindex(String className, long classPK) throws SearchException
SearchException
void reindex(String[] ids) throws SearchException
SearchException
@Bufferable void reindex(T object) throws SearchException
SearchException
default void reindex(T object, boolean notify) throws SearchException
SearchException
Hits search(SearchContext searchContext) throws SearchException
SearchException
Hits search(SearchContext searchContext, String... selectedFieldNames) throws SearchException
SearchException
long searchCount(SearchContext searchContext) throws SearchException
SearchException
void setIndexerEnabled(boolean indexerEnabled)