public abstract class AbstractSolrSearchProvider extends Object implements SolrSearchProvider
SolrSearchProvider.SolrSearchProvider.CommitType| Modifier and Type | Field and Description |
|---|---|
protected static String |
CHARSET |
protected static int |
DEFAULT_ALIVE_CHECK_INTERVAL |
protected static String |
DEFAULT_CONFIGSET_PROPERTY |
protected static String |
DEFAULT_CONFIGSET_VALUE |
protected static int |
DEFAULT_CONNECTION_TIMEOUT |
protected static int |
DEFAULT_MAX_CONNECTIONS |
protected static int |
DEFAULT_MAX_CONNECTIONS_PER_HOST |
protected static int |
DEFAULT_SOCKET_TIMEOUT |
protected static String |
FILTER_IGNORE_CASE_KEY |
protected static String |
IGNORE_CASE_ATTRIBUTE |
protected static String |
MANAGED_STOPWORDS_RESOURCE_CLASS |
protected static String |
MANAGED_SYNONYM_RESOURCE_CLASS |
protected static String |
SOLR_QUERY_SELECT_ALL |
protected static String |
STOP_WORDS_RESOURCE_PATH |
protected static String |
SYNONYM_RESOURCE_PATH |
protected static String |
SYNONYM_SPLIT_CHAR |
protected static String |
UTF8_ENCODING |
| Constructor and Description |
|---|
AbstractSolrSearchProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Set<String>> |
buildSynonyms(String synonymFromInput) |
protected Map<String,Set<String>> |
buildSynonyms(String synonymFromInput,
String synonymToInput) |
void |
commit(Index index,
SolrSearchProvider.CommitType commitType)
Performs a commit on the given index.
|
protected void |
compareSynonyms(Map<String,Set<String>> synonyms,
Map<String,Set<String>> serverSynonyms,
Map<String,Set<String>> synonymsToAdd,
Set<String> synonymsToRemove) |
protected Map<String,Set<String>> |
createSynonyms(String lang,
FacetSearchConfig facetSearchConfig) |
protected Map<String,Map<String,Set<String>>> |
createSynonymsForLanguages(Collection<String> languages,
FacetSearchConfig facetSearchConfig) |
void |
deleteAllDocuments(Index index)
Deletes all documents from an index.
|
void |
deleteDocumentsByPk(Index index,
Collection<PK> pks)
Deletes documents matching the provided list of pks
|
void |
deleteOldDocuments(Index index,
long indexOperationId)
Deletes old documents from an index.
|
protected String |
encode(String string) |
protected void |
executeHttpDelete(HttpClient httpClient,
String requestUrl) |
protected <T> T |
executeHttpGet(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Class<T> responseType) |
protected void |
executeHttpPost(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Object body) |
protected void |
executeHttpPut(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Object body) |
protected void |
exportStopWords(String serverURL,
HttpClient httpClient,
Collection<String> languages,
Map<String,Set<String>> stopWordsForLanguage) |
protected void |
exportSynonyms(String serverURL,
HttpClient httpClient,
Collection<String> languages,
Map<String,Map<String,Set<String>>> synonymsForLanguagesMap) |
ConfigurationService |
getConfigurationService() |
IndexNameResolver |
getIndexNameResolver() |
protected int |
getIntegerValue(Integer bigInt,
int defaultValue) |
protected Collection<String> |
getLanguages(FacetSearchConfig configuration) |
SolrClientPool |
getSolrClientPool() |
SolrFacetSearchConfigDao |
getSolrFacetSearchConfigDao() |
protected Map<String,Set<String>> |
getStopWordsFromConfig(FacetSearchConfig facetSearchConfig) |
protected void |
logSynonyms(SolrFacetSearchConfigModel facetSearchConfigModel) |
void |
optimize(Index index)
Optimizes a given index.
|
protected String |
resolveConfigSet(FacetSearchConfig facetSearchConfig,
IndexedType indexedType) |
Index |
resolveIndex(FacetSearchConfig facetSearchConfig,
IndexedType indexedType,
String qualifier)
Resolves an index.
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setIndexNameResolver(IndexNameResolver indexNameResolver) |
void |
setSolrClientPool(SolrClientPool solrClientPool) |
void |
setSolrFacetSearchConfigDao(SolrFacetSearchConfigDao solrFacetSearchConfigDao) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateIndex, deleteIndex, exportConfig, getClient, getClientForIndexingprotected static final int DEFAULT_ALIVE_CHECK_INTERVAL
protected static final int DEFAULT_MAX_CONNECTIONS
protected static final int DEFAULT_MAX_CONNECTIONS_PER_HOST
protected static final int DEFAULT_SOCKET_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT
protected static final String DEFAULT_CONFIGSET_PROPERTY
protected static final String DEFAULT_CONFIGSET_VALUE
protected static final String SYNONYM_SPLIT_CHAR
protected static final String SYNONYM_RESOURCE_PATH
protected static final String STOP_WORDS_RESOURCE_PATH
protected static final String MANAGED_SYNONYM_RESOURCE_CLASS
protected static final String MANAGED_STOPWORDS_RESOURCE_CLASS
protected static final String FILTER_IGNORE_CASE_KEY
protected static final String IGNORE_CASE_ATTRIBUTE
protected static final String CHARSET
protected static final String UTF8_ENCODING
protected static final String SOLR_QUERY_SELECT_ALL
public Index resolveIndex(FacetSearchConfig facetSearchConfig, IndexedType indexedType, String qualifier)
SolrSearchProviderIndex.resolveIndex in interface SolrSearchProviderfacetSearchConfig - - the facet search configurationindexedType - - the indexed typequalifier - - the qualifierpublic void deleteAllDocuments(Index index) throws SolrServiceException
SolrSearchProviderdeleteAllDocuments in interface SolrSearchProviderindex - - the indexSolrServiceException - if an error occurspublic void deleteOldDocuments(Index index, long indexOperationId) throws SolrServiceException
SolrSearchProviderdeleteOldDocuments in interface SolrSearchProviderindex - - the indexindexOperationId - - the index operation idSolrServiceException - if an error occurspublic void deleteDocumentsByPk(Index index, Collection<PK> pks) throws SolrServiceException
SolrSearchProviderdeleteDocumentsByPk in interface SolrSearchProviderindex - - the indexpks - - the pks listSolrServiceException - if an error occurspublic void commit(Index index, SolrSearchProvider.CommitType commitType) throws SolrServiceException
SolrSearchProvidercommit in interface SolrSearchProviderindex - - the indexcommitType - - the commit typeSolrServiceException - if an error occurspublic void optimize(Index index) throws SolrServiceException
SolrSearchProvideroptimize in interface SolrSearchProviderindex - - the indexSolrServiceException - if an error occursprotected String resolveConfigSet(FacetSearchConfig facetSearchConfig, IndexedType indexedType)
protected int getIntegerValue(Integer bigInt, int defaultValue)
protected String encode(String string) throws SolrServiceException
SolrServiceExceptionprotected void exportSynonyms(String serverURL, HttpClient httpClient, Collection<String> languages, Map<String,Map<String,Set<String>>> synonymsForLanguagesMap) throws IOException, SolrServiceException, SolrRestException
protected void compareSynonyms(Map<String,Set<String>> synonyms, Map<String,Set<String>> serverSynonyms, Map<String,Set<String>> synonymsToAdd, Set<String> synonymsToRemove)
protected Collection<String> getLanguages(FacetSearchConfig configuration) throws SolrServiceException
SolrServiceExceptionprotected Map<String,Map<String,Set<String>>> createSynonymsForLanguages(Collection<String> languages, FacetSearchConfig facetSearchConfig)
protected Map<String,Set<String>> createSynonyms(String lang, FacetSearchConfig facetSearchConfig)
protected Map<String,Set<String>> buildSynonyms(String synonymFromInput, String synonymToInput)
protected void logSynonyms(SolrFacetSearchConfigModel facetSearchConfigModel)
protected void exportStopWords(String serverURL, HttpClient httpClient, Collection<String> languages, Map<String,Set<String>> stopWordsForLanguage) throws IOException, SolrServiceException, SolrRestException
protected Map<String,Set<String>> getStopWordsFromConfig(FacetSearchConfig facetSearchConfig)
protected <T> T executeHttpGet(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Class<T> responseType)
throws IOException,
SolrRestException
IOExceptionSolrRestExceptionprotected void executeHttpPut(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Object body)
throws IOException,
SolrRestException
IOExceptionSolrRestExceptionprotected void executeHttpPost(HttpClient httpClient,
String requestUrl,
ObjectMapper objectMapper,
Object body)
throws IOException,
SolrRestException
IOExceptionSolrRestExceptionprotected void executeHttpDelete(HttpClient httpClient,
String requestUrl)
throws IOException,
SolrRestException
IOExceptionSolrRestExceptionpublic SolrFacetSearchConfigDao getSolrFacetSearchConfigDao()
public void setSolrFacetSearchConfigDao(SolrFacetSearchConfigDao solrFacetSearchConfigDao)
public IndexNameResolver getIndexNameResolver()
public void setIndexNameResolver(IndexNameResolver indexNameResolver)
public ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
public SolrClientPool getSolrClientPool()
public void setSolrClientPool(SolrClientPool solrClientPool)
Copyright © 2017 SAP SE. All Rights Reserved.