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(Object obj) throws SearchException;
033
034 public String[] getClassNames();
035
036 public Document getDocument(Object obj) throws SearchException;
037
038 public BooleanQuery getFacetQuery(
039 String className, SearchContext searchContext)
040 throws Exception;
041
042 public IndexerPostProcessor[] getIndexerPostProcessors();
043
044 public String getSearchEngineId();
045
046 public String getSortField(String orderByCol);
047
048 public Summary getSummary(
049 Document document, Locale locale, String snippet,
050 PortletURL portletURL)
051 throws SearchException;
052
053 public boolean hasPermission(
054 PermissionChecker permissionChecker, long entryClassPK,
055 String actionId)
056 throws Exception;
057
058 public boolean isFilterSearch();
059
060 public boolean isStagingAware();
061
062 public void postProcessContextQuery(
063 BooleanQuery contextQuery, SearchContext searchContext)
064 throws Exception;
065
066 public void postProcessSearchQuery(
067 BooleanQuery searchQuery, SearchContext searchContext)
068 throws Exception;
069
070 public void registerIndexerPostProcessor(
071 IndexerPostProcessor indexerPostProcessor);
072
073 public void reindex(Object obj) throws SearchException;
074
075 public void reindex(String className, long classPK) throws SearchException;
076
077 public void reindex(String[] ids) throws SearchException;
078
079 public Hits search(SearchContext searchContext) throws SearchException;
080
081 public void unregisterIndexerPostProcessor(
082 IndexerPostProcessor indexerPostProcessor);
083
084 }