001
014
015 package com.liferay.portal.kernel.search;
016
017 import com.liferay.portal.security.permission.PermissionChecker;
018
019 import java.util.Locale;
020
021 import javax.portlet.PortletURL;
022
023
028 public interface Indexer {
029
030 public static final int DEFAULT_INTERVAL = 10000;
031
032 public void delete(long companyId, String uid) throws SearchException;
033
034 public void delete(Object obj) throws SearchException;
035
036 public String[] getClassNames();
037
038 public Document getDocument(Object obj) throws SearchException;
039
040 public BooleanQuery getFacetQuery(
041 String className, SearchContext searchContext)
042 throws Exception;
043
044 public BooleanQuery getFullQuery(SearchContext searchContext)
045 throws SearchException;
046
047 public IndexerPostProcessor[] getIndexerPostProcessors();
048
049 public String getPortletId();
050
051 public String getSearchEngineId();
052
053 public String getSortField(String orderByCol);
054
055 public Summary getSummary(
056 Document document, Locale locale, String snippet,
057 PortletURL portletURL)
058 throws SearchException;
059
060 public boolean hasPermission(
061 PermissionChecker permissionChecker, long entryClassPK,
062 String actionId)
063 throws Exception;
064
065 public boolean isFilterSearch();
066
067 public boolean isPermissionAware();
068
069 public boolean isStagingAware();
070
071 public void postProcessContextQuery(
072 BooleanQuery contextQuery, SearchContext searchContext)
073 throws Exception;
074
075 public void postProcessSearchQuery(
076 BooleanQuery searchQuery, SearchContext searchContext)
077 throws Exception;
078
079 public void registerIndexerPostProcessor(
080 IndexerPostProcessor indexerPostProcessor);
081
082 public void reindex(Object obj) throws SearchException;
083
084 public void reindex(String className, long classPK) throws SearchException;
085
086 public void reindex(String[] ids) throws SearchException;
087
088 public Hits search(SearchContext searchContext) throws SearchException;
089
090 public void unregisterIndexerPostProcessor(
091 IndexerPostProcessor indexerPostProcessor);
092
093 }