001
014
015 package com.liferay.portal.kernel.search;
016
017 import com.liferay.portal.kernel.messaging.proxy.BaseMultiDestinationProxyBean;
018 import com.liferay.portal.kernel.messaging.proxy.ProxyRequest;
019
020 import java.util.List;
021 import java.util.Map;
022
023
028 public class IndexSearcherProxyBean
029 extends BaseMultiDestinationProxyBean implements IndexSearcher {
030
031 @Override
032 public String getDestinationName(ProxyRequest proxyRequest) {
033 Object[] arguments = proxyRequest.getArguments();
034
035 String searchEngineId = null;
036
037 if (arguments[0] instanceof SearchContext) {
038 SearchContext searchContext = (SearchContext)arguments[0];
039
040 searchEngineId = searchContext.getSearchEngineId();
041 }
042 else {
043 searchEngineId = (String)arguments[0];
044 }
045
046 return SearchEngineUtil.getSearchReaderDestinationName(searchEngineId);
047 }
048
049 public Hits search(SearchContext searchContext, Query query) {
050 throw new UnsupportedOperationException();
051 }
052
053 public Hits search(
054 String searchEngineId, long companyId, Query query, Sort[] sort,
055 int start, int end) {
056
057 throw new UnsupportedOperationException();
058 }
059
060 public String spellCheckKeywords(SearchContext searchContext) {
061 throw new UnsupportedOperationException();
062 }
063
064 public Map<String, List<String>> spellCheckKeywords(
065 SearchContext searchContext, int max) {
066
067 throw new UnsupportedOperationException();
068 }
069
070 public String[] suggestKeywordQueries(
071 SearchContext searchContext, int max) {
072
073 throw new UnsupportedOperationException();
074 }
075
076 }