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