001
014
015 package com.liferay.portal.kernel.search;
016
017 import com.liferay.portal.kernel.search.filter.BooleanFilter;
018 import com.liferay.portal.security.permission.PermissionChecker;
019
020 import java.util.Locale;
021
022 import javax.portlet.PortletRequest;
023 import javax.portlet.PortletResponse;
024
025
030 public interface Indexer {
031
032 public static final int DEFAULT_INTERVAL = 10000;
033
034 public void delete(long companyId, String uid) throws SearchException;
035
036 public void delete(Object obj) throws SearchException;
037
038 public String getClassName();
039
040
043 @Deprecated
044 public String[] getClassNames();
045
046 public Document getDocument(Object obj) throws SearchException;
047
048 public BooleanFilter getFacetBooleanFilter(
049 String className, SearchContext searchContext)
050 throws Exception;
051
052 public BooleanQuery getFullQuery(SearchContext searchContext)
053 throws SearchException;
054
055 public IndexerPostProcessor[] getIndexerPostProcessors();
056
057
060 @Deprecated
061 public String getPortletId();
062
063 public String[] getSearchClassNames();
064
065 public String getSearchEngineId();
066
067 public String getSortField(String orderByCol);
068
069 public String getSortField(String orderByCol, int sortType);
070
071
075 @Deprecated
076 public Summary getSummary(Document document, Locale locale, String snippet)
077 throws SearchException;
078
079 public Summary getSummary(
080 Document document, String snippet, PortletRequest portletRequest,
081 PortletResponse portletResponse)
082 throws SearchException;
083
084 public boolean hasPermission(
085 PermissionChecker permissionChecker, String entryClassName,
086 long entryClassPK, String actionId)
087 throws Exception;
088
089 public boolean isCommitImmediately();
090
091 public boolean isFilterSearch();
092
093 public boolean isPermissionAware();
094
095 public boolean isStagingAware();
096
097 public boolean isVisible(long classPK, int status) throws Exception;
098
099 public boolean isVisibleRelatedEntry(long classPK, int status)
100 throws Exception;
101
102 public void postProcessContextBooleanFilter(
103 BooleanFilter contextBooleanFilter, SearchContext searchContext)
104 throws Exception;
105
106
110 @Deprecated
111 public void postProcessContextQuery(
112 BooleanQuery contextQuery, SearchContext searchContext)
113 throws Exception;
114
115 public void postProcessSearchQuery(
116 BooleanQuery searchQuery, BooleanFilter fullQueryBooleanFilter,
117 SearchContext searchContext)
118 throws Exception;
119
120
124 @Deprecated
125 public void postProcessSearchQuery(
126 BooleanQuery searchQuery, SearchContext searchContext)
127 throws Exception;
128
129 public void registerIndexerPostProcessor(
130 IndexerPostProcessor indexerPostProcessor);
131
132 public void reindex(Object obj) throws SearchException;
133
134 public void reindex(String className, long classPK) throws SearchException;
135
136 public void reindex(String[] ids) throws SearchException;
137
138 public Hits search(SearchContext searchContext) throws SearchException;
139
140 public Hits search(
141 SearchContext searchContext, String... selectedFieldNames)
142 throws SearchException;
143
144 public long searchCount(SearchContext searchContext) throws SearchException;
145
146 public void unregisterIndexerPostProcessor(
147 IndexerPostProcessor indexerPostProcessor);
148
149 }