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 = 1000;
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 isStagingAware();
068
069 public void postProcessContextQuery(
070 BooleanQuery contextQuery, SearchContext searchContext)
071 throws Exception;
072
073 public void postProcessSearchQuery(
074 BooleanQuery searchQuery, SearchContext searchContext)
075 throws Exception;
076
077 public void registerIndexerPostProcessor(
078 IndexerPostProcessor indexerPostProcessor);
079
080 public void reindex(Object obj) throws SearchException;
081
082 public void reindex(String className, long classPK) throws SearchException;
083
084 public void reindex(String[] ids) throws SearchException;
085
086 public Hits search(SearchContext searchContext) throws SearchException;
087
088 public void unregisterIndexerPostProcessor(
089 IndexerPostProcessor indexerPostProcessor);
090
091 }