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() |
Document |
getDocument(T object) |
BooleanFilter |
getFacetBooleanFilter(String className,
SearchContext searchContext) |
BooleanQuery |
getFullQuery(SearchContext searchContext) |
IndexerPostProcessor[] |
getIndexerPostProcessors() |
String[] |
getSearchClassNames() |
String |
getSearchEngineId() |
String |
getSortField(String orderByCol)
Deprecated.
As of Judson (7.1.x), replaced by
com.liferay.portal.sort.SortFieldBuilder |
String |
getSortField(String orderByCol,
int sortType)
Deprecated.
As of Judson (7.1.x), replaced by
com.liferay.portal.sort.SortFieldBuilder |
Summary |
getSummary(Document document,
String snippet,
PortletRequest portletRequest,
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) |
boolean |
isVisibleRelatedEntry(long classPK,
int status)
Deprecated.
As of Judson (7.1.x), replaced by
RelatedEntryIndexer.isVisibleRelatedEntry(long, int) |
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 |
registerIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor) |
void |
reindex(Collection<T> objects) |
void |
reindex(String[] ids) |
void |
reindex(String className,
long classPK) |
void |
reindex(T object) |
Hits |
search(SearchContext searchContext) |
Hits |
search(SearchContext searchContext,
String... selectedFieldNames) |
long |
searchCount(SearchContext searchContext) |
void |
setIndexerEnabled(boolean indexerEnabled) |
void |
unregisterIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor) |
static final int DEFAULT_INTERVAL
void delete(long companyId, String uid) throws SearchException
SearchException
@Bufferable void delete(T object) throws SearchException
SearchException
String getClassName()
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()
String getSearchEngineId()
@Deprecated String getSortField(String orderByCol)
com.liferay.portal.sort.SortFieldBuilder
@Deprecated String getSortField(String orderByCol, int sortType)
com.liferay.portal.sort.SortFieldBuilder
Summary getSummary(Document document, String snippet, PortletRequest portletRequest, 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
@Deprecated boolean isVisibleRelatedEntry(long classPK, int status) throws Exception
RelatedEntryIndexer.isVisibleRelatedEntry(long, int)
classPK
- status
- 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
void registerIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)
@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
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)
void unregisterIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)