com.liferay.portal.kernel.search
Class BaseIndexer
java.lang.Object
com.liferay.portal.kernel.search.BaseIndexer
- All Implemented Interfaces:
- Indexer
- Direct Known Subclasses:
- AssetIndexer, BaseAlloyIndexer, BlogsIndexer, BookmarksIndexer, CalIndexer, DLIndexer, FacetedSearcher, JournalIndexer, MBIndexer, OrganizationIndexer, PluginPackageIndexer, SCIndexer, UserIndexer, WikiIndexer
public abstract class BaseIndexer
- extends Object
- implements Indexer
Method Summary |
protected void |
addLocalizedSearchTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
Deprecated. addSearchLocalizedTerm(BooleanQuery, SearchContext,
String, boolean) |
protected void |
addSearchArrayQuery(BooleanQuery searchQuery,
SearchContext searchContext,
String field)
|
protected void |
addSearchAssetCategoryIds(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
addSearchAssetCategoryTitles(Document document,
String field,
List<AssetCategory> assetCategories)
|
protected void |
addSearchAssetTagNames(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
addSearchDDMStruture(BooleanQuery searchQuery,
SearchContext searchContext,
DDMStructure ddmStructure)
|
protected void |
addSearchEntryClassNames(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
addSearchExpando(BooleanQuery searchQuery,
SearchContext searchContext,
String keywords)
|
protected void |
addSearchGroupId(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
addSearchKeywords(BooleanQuery searchQuery,
SearchContext searchContext)
|
protected void |
addSearchLocalizedTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
|
protected void |
addSearchTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
|
protected void |
addStagingGroupKeyword(Document document,
long groupId)
|
protected BooleanQuery |
createFullQuery(BooleanQuery contextQuery,
SearchContext searchContext)
|
void |
delete(long companyId,
String uid)
|
void |
delete(Object obj)
|
protected void |
deleteDocument(long companyId,
long field1)
|
protected void |
deleteDocument(long companyId,
long field1,
String field2)
|
protected void |
deleteDocument(long companyId,
String field1)
|
protected void |
deleteDocument(long companyId,
String field1,
String field2)
|
protected abstract void |
doDelete(Object obj)
|
protected abstract Document |
doGetDocument(Object obj)
|
protected String |
doGetSortField(String orderByCol)
|
protected abstract Summary |
doGetSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
|
protected abstract void |
doReindex(Object obj)
|
protected abstract void |
doReindex(String[] ids)
|
protected abstract void |
doReindex(String className,
long classPK)
|
protected Hits |
filterSearch(Hits hits,
PermissionChecker permissionChecker,
SearchContext searchContext)
|
protected Document |
getBaseModelDocument(String portletId,
BaseModel<?> baseModel)
|
protected String |
getClassName(SearchContext searchContext)
|
Document |
getDocument(Object obj)
|
BooleanQuery |
getFacetQuery(String className,
SearchContext searchContext)
|
BooleanQuery |
getFullQuery(SearchContext searchContext)
|
IndexerPostProcessor[] |
getIndexerPostProcessors()
|
protected long |
getParentGroupId(long groupId)
|
protected abstract String |
getPortletId(SearchContext searchContext)
|
String |
getSearchEngineId()
|
String |
getSortField(String orderByCol)
|
Summary |
getSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
|
boolean |
hasPermission(PermissionChecker permissionChecker,
long entryClassPK,
String actionId)
|
boolean |
isFilterSearch()
|
boolean |
isIndexerEnabled()
|
boolean |
isPermissionAware()
|
boolean |
isStagingAware()
|
protected void |
populateAddresses(Document document,
List<Address> addresses,
long regionId,
long countryId)
|
void |
postProcessContextQuery(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
postProcessFullQuery(BooleanQuery fullQuery,
SearchContext searchContext)
|
void |
postProcessSearchQuery(BooleanQuery searchQuery,
SearchContext searchContext)
|
void |
registerIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)
|
void |
reindex(Object obj)
|
void |
reindex(String[] ids)
|
void |
reindex(String className,
long classPK)
|
Hits |
search(SearchContext searchContext)
|
protected void |
setStagingAware(boolean stagingAware)
|
void |
unregisterIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INDEX_FILTER_SEARCH_LIMIT
public static final int INDEX_FILTER_SEARCH_LIMIT
BaseIndexer
public BaseIndexer()
delete
public void delete(long companyId,
String uid)
throws SearchException
- Specified by:
delete
in interface Indexer
- Throws:
SearchException
delete
public void delete(Object obj)
throws SearchException
- Specified by:
delete
in interface Indexer
- Throws:
SearchException
getDocument
public Document getDocument(Object obj)
throws SearchException
- Specified by:
getDocument
in interface Indexer
- Throws:
SearchException
getFacetQuery
public BooleanQuery getFacetQuery(String className,
SearchContext searchContext)
throws Exception
- Specified by:
getFacetQuery
in interface Indexer
- Throws:
Exception
getFullQuery
public BooleanQuery getFullQuery(SearchContext searchContext)
throws SearchException
- Specified by:
getFullQuery
in interface Indexer
- Throws:
SearchException
getIndexerPostProcessors
public IndexerPostProcessor[] getIndexerPostProcessors()
- Specified by:
getIndexerPostProcessors
in interface Indexer
getSearchEngineId
public String getSearchEngineId()
- Specified by:
getSearchEngineId
in interface Indexer
getSortField
public String getSortField(String orderByCol)
- Specified by:
getSortField
in interface Indexer
getSummary
public Summary getSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
throws SearchException
- Specified by:
getSummary
in interface Indexer
- Throws:
SearchException
hasPermission
public boolean hasPermission(PermissionChecker permissionChecker,
long entryClassPK,
String actionId)
throws Exception
- Specified by:
hasPermission
in interface Indexer
- Throws:
Exception
isFilterSearch
public boolean isFilterSearch()
- Specified by:
isFilterSearch
in interface Indexer
isIndexerEnabled
public boolean isIndexerEnabled()
isPermissionAware
public boolean isPermissionAware()
- Specified by:
isPermissionAware
in interface Indexer
isStagingAware
public boolean isStagingAware()
- Specified by:
isStagingAware
in interface Indexer
postProcessContextQuery
public void postProcessContextQuery(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Specified by:
postProcessContextQuery
in interface Indexer
- Throws:
Exception
postProcessSearchQuery
public void postProcessSearchQuery(BooleanQuery searchQuery,
SearchContext searchContext)
throws Exception
- Specified by:
postProcessSearchQuery
in interface Indexer
- Throws:
Exception
registerIndexerPostProcessor
public void registerIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)
- Specified by:
registerIndexerPostProcessor
in interface Indexer
reindex
public void reindex(Object obj)
throws SearchException
- Specified by:
reindex
in interface Indexer
- Throws:
SearchException
reindex
public void reindex(String className,
long classPK)
throws SearchException
- Specified by:
reindex
in interface Indexer
- Throws:
SearchException
reindex
public void reindex(String[] ids)
throws SearchException
- Specified by:
reindex
in interface Indexer
- Throws:
SearchException
search
public Hits search(SearchContext searchContext)
throws SearchException
- Specified by:
search
in interface Indexer
- Throws:
SearchException
unregisterIndexerPostProcessor
public void unregisterIndexerPostProcessor(IndexerPostProcessor indexerPostProcessor)
- Specified by:
unregisterIndexerPostProcessor
in interface Indexer
addLocalizedSearchTerm
protected void addLocalizedSearchTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
throws Exception
- Deprecated.
addSearchLocalizedTerm(BooleanQuery, SearchContext,
String, boolean)
- Throws:
Exception
addSearchArrayQuery
protected void addSearchArrayQuery(BooleanQuery searchQuery,
SearchContext searchContext,
String field)
throws Exception
- Throws:
Exception
addSearchAssetCategoryIds
protected void addSearchAssetCategoryIds(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
addSearchAssetCategoryTitles
protected void addSearchAssetCategoryTitles(Document document,
String field,
List<AssetCategory> assetCategories)
addSearchAssetTagNames
protected void addSearchAssetTagNames(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
addSearchDDMStruture
protected void addSearchDDMStruture(BooleanQuery searchQuery,
SearchContext searchContext,
DDMStructure ddmStructure)
throws Exception
- Throws:
Exception
addSearchEntryClassNames
protected void addSearchEntryClassNames(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
addSearchExpando
protected void addSearchExpando(BooleanQuery searchQuery,
SearchContext searchContext,
String keywords)
throws Exception
- Throws:
Exception
addSearchGroupId
protected void addSearchGroupId(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
addSearchKeywords
protected void addSearchKeywords(BooleanQuery searchQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
addSearchLocalizedTerm
protected void addSearchLocalizedTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
throws Exception
- Throws:
Exception
addSearchTerm
protected void addSearchTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
throws Exception
- Throws:
Exception
addStagingGroupKeyword
protected void addStagingGroupKeyword(Document document,
long groupId)
throws Exception
- Throws:
Exception
createFullQuery
protected BooleanQuery createFullQuery(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
deleteDocument
protected void deleteDocument(long companyId,
long field1)
throws Exception
- Throws:
Exception
deleteDocument
protected void deleteDocument(long companyId,
long field1,
String field2)
throws Exception
- Throws:
Exception
deleteDocument
protected void deleteDocument(long companyId,
String field1)
throws Exception
- Throws:
Exception
deleteDocument
protected void deleteDocument(long companyId,
String field1,
String field2)
throws Exception
- Throws:
Exception
doDelete
protected abstract void doDelete(Object obj)
throws Exception
- Throws:
Exception
doGetDocument
protected abstract Document doGetDocument(Object obj)
throws Exception
- Throws:
Exception
doGetSortField
protected String doGetSortField(String orderByCol)
doGetSummary
protected abstract Summary doGetSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
throws Exception
- Throws:
Exception
doReindex
protected abstract void doReindex(Object obj)
throws Exception
- Throws:
Exception
doReindex
protected abstract void doReindex(String className,
long classPK)
throws Exception
- Throws:
Exception
doReindex
protected abstract void doReindex(String[] ids)
throws Exception
- Throws:
Exception
filterSearch
protected Hits filterSearch(Hits hits,
PermissionChecker permissionChecker,
SearchContext searchContext)
getBaseModelDocument
protected Document getBaseModelDocument(String portletId,
BaseModel<?> baseModel)
throws SystemException
- Throws:
SystemException
getClassName
protected String getClassName(SearchContext searchContext)
getParentGroupId
protected long getParentGroupId(long groupId)
getPortletId
protected abstract String getPortletId(SearchContext searchContext)
populateAddresses
protected void populateAddresses(Document document,
List<Address> addresses,
long regionId,
long countryId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
postProcessFullQuery
protected void postProcessFullQuery(BooleanQuery fullQuery,
SearchContext searchContext)
throws Exception
- Throws:
Exception
setStagingAware
protected void setStagingAware(boolean stagingAware)