public abstract class AbstractSolrSearchProvider extends java.lang.Object implements SolrSearchProvider
SolrSearchProvider.SolrSearchProvider.CommitType| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_ALIVE_CHECK_INTERVAL |
protected static java.lang.String |
DEFAULT_CONFIGSET_PROPERTY |
protected static java.lang.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 java.lang.String |
INDEX_PARAM |
protected static java.lang.String |
JSON_CONTENT_TYPE |
protected static java.lang.String |
MANAGED_IGNORE_CASE_FIELD |
protected static java.lang.String |
MANAGED_INIT_ARGS_FIELD |
protected static java.lang.String |
MANAGED_LIST_FIELD |
protected static java.lang.String |
MANAGED_MAP_FIELD |
protected static java.lang.String |
MANAGED_RESOURCES_PATH |
protected static java.lang.String |
MANAGED_RESOURCES_ROOT_FIELD |
protected static java.lang.String |
MANAGED_STOP_WORDS_IGNORE_CASE_KEY |
protected static java.lang.String |
MANAGED_STOP_WORDS_PATH |
protected static java.lang.String |
MANAGED_STOP_WORDS_ROOT_FIELD |
protected static java.lang.String |
MANAGED_STOP_WORDS_TYPE |
protected static java.lang.String |
MANAGED_SYNONYMS_IGNORE_CASE_KEY |
protected static java.lang.String |
MANAGED_SYNONYMS_PATH |
protected static java.lang.String |
MANAGED_SYNONYMS_ROOT_FIELD |
protected static java.lang.String |
MANAGED_SYNONYMS_TYPE |
protected static java.lang.String |
SOLR_QUERY_SELECT_ALL |
protected static java.lang.String |
SYNONYM_SPLIT_CHAR |
protected static java.lang.String |
UTF8_ENCODING |
| Constructor and Description |
|---|
AbstractSolrSearchProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildSynonyms(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> synonyms,
java.lang.String from,
java.lang.String to) |
protected void |
closeHttpClient(HttpClient httpClient) |
protected java.util.List<java.lang.String> |
collectLanguages(FacetSearchConfig configuration) |
void |
commit(Index index,
SolrSearchProvider.CommitType commitType)
Performs a commit on the given index.
|
protected HttpClient |
createHttpClient(SolrClientConfig solrClientConfig) |
void |
deleteAllDocuments(Index index)
Deletes all documents from an index.
|
void |
deleteDocumentsByPk(Index index,
java.util.Collection<PK> pks)
Deletes documents matching the provided list of pks
|
void |
deleteOldDocuments(Index index,
long indexOperationId)
Deletes old documents from an index.
|
protected java.lang.String |
encode(java.lang.String string) |
protected void |
executeDelete(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path) |
protected <any> |
executeGet(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path) |
protected void |
executePost(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path,
java.lang.Object payload) |
protected java.util.List<java.lang.String> |
expandSynonyms(java.lang.String value) |
protected void |
exportConfig(Index index,
SolrClient solrClient) |
protected void |
exportStopWords(Index index,
SolrClient solrClient,
java.util.Map<java.lang.String,ManagedResource> managedResources,
java.util.List<java.lang.String> languages) |
protected void |
exportSynonyms(Index index,
SolrClient solrClient,
java.util.Map<java.lang.String,ManagedResource> managedResources,
java.util.List<java.lang.String> languages) |
ConfigurationService |
getConfigurationService() |
IndexNameResolver |
getIndexNameResolver() |
protected int |
getIntegerValue(java.lang.Integer bigInt,
int defaultValue) |
SolrClientPool |
getSolrClientPool() |
SolrFacetSearchConfigDao |
getSolrFacetSearchConfigDao() |
protected java.util.Map<java.lang.String,ManagedResource> |
loadManagedResourcesFromServer(Index index,
SolrClient solrClient) |
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
loadStopWordsFromConfiguration(FacetSearchConfig facetSearchConfig,
java.util.Collection<java.lang.String> languages) |
protected java.util.Set<java.lang.String> |
loadStopWordsFromServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath) |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> |
loadSynonymsFromConfiguration(FacetSearchConfig facetSearchConfig,
java.util.Collection<java.lang.String> languages) |
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
loadSynonymsFromServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath) |
void |
optimize(Index index)
Optimizes a given index.
|
protected java.lang.String |
resolveConfigSet(Index index) |
Index |
resolveIndex(FacetSearchConfig facetSearchConfig,
IndexedType indexedType,
java.lang.String qualifier)
Resolves an index.
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setIndexNameResolver(IndexNameResolver indexNameResolver) |
void |
setSolrClientPool(SolrClientPool solrClientPool) |
void |
setSolrFacetSearchConfigDao(SolrFacetSearchConfigDao solrFacetSearchConfigDao) |
protected void |
updateStopWordsOnServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath,
java.util.Set<java.lang.String> stopWords,
java.util.Set<java.lang.String> serverStopWords) |
protected void |
updateSynonymsOnServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> synonyms,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> serverSynonyms) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateIndex, deleteIndex, exportConfig, getClient, getClientForIndexingprotected static final java.lang.String INDEX_PARAM
protected 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 java.lang.String DEFAULT_CONFIGSET_PROPERTY
protected static final java.lang.String DEFAULT_CONFIGSET_VALUE
protected static final java.lang.String SYNONYM_SPLIT_CHAR
protected static final java.lang.String MANAGED_INIT_ARGS_FIELD
protected static final java.lang.String MANAGED_IGNORE_CASE_FIELD
protected static final java.lang.String MANAGED_LIST_FIELD
protected static final java.lang.String MANAGED_MAP_FIELD
protected static final java.lang.String MANAGED_RESOURCES_PATH
protected static final java.lang.String MANAGED_RESOURCES_ROOT_FIELD
protected static final java.lang.String MANAGED_SYNONYMS_IGNORE_CASE_KEY
protected static final java.lang.String MANAGED_SYNONYMS_TYPE
protected static final java.lang.String MANAGED_SYNONYMS_PATH
protected static final java.lang.String MANAGED_SYNONYMS_ROOT_FIELD
protected static final java.lang.String MANAGED_STOP_WORDS_IGNORE_CASE_KEY
protected static final java.lang.String MANAGED_STOP_WORDS_TYPE
protected static final java.lang.String MANAGED_STOP_WORDS_PATH
protected static final java.lang.String MANAGED_STOP_WORDS_ROOT_FIELD
protected static final java.lang.String JSON_CONTENT_TYPE
protected static final java.lang.String UTF8_ENCODING
protected static final java.lang.String SOLR_QUERY_SELECT_ALL
public Index resolveIndex(FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.lang.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, java.util.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 java.lang.String resolveConfigSet(Index index)
protected int getIntegerValue(java.lang.Integer bigInt,
int defaultValue)
protected HttpClient createHttpClient(SolrClientConfig solrClientConfig)
protected void closeHttpClient(HttpClient httpClient)
protected void exportConfig(Index index, SolrClient solrClient) throws SolrServiceException, SolrServerException, java.io.IOException
SolrServiceExceptionSolrServerExceptionjava.io.IOExceptionprotected java.util.Map<java.lang.String,ManagedResource> loadManagedResourcesFromServer(Index index, SolrClient solrClient) throws SolrServerException, java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected java.util.List<java.lang.String> collectLanguages(FacetSearchConfig configuration)
protected void exportSynonyms(Index index, SolrClient solrClient, java.util.Map<java.lang.String,ManagedResource> managedResources, java.util.List<java.lang.String> languages) throws java.io.IOException, SolrServiceException
java.io.IOExceptionSolrServiceExceptionprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> loadSynonymsFromConfiguration(FacetSearchConfig facetSearchConfig, java.util.Collection<java.lang.String> languages)
protected void buildSynonyms(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> synonyms,
java.lang.String from,
java.lang.String to)
protected java.util.List<java.lang.String> expandSynonyms(java.lang.String value)
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> loadSynonymsFromServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath)
throws SolrServerException,
java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected void updateSynonymsOnServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> synonyms,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> serverSynonyms)
throws SolrServiceException,
SolrServerException,
java.io.IOException
SolrServiceExceptionSolrServerExceptionjava.io.IOExceptionprotected void exportStopWords(Index index, SolrClient solrClient, java.util.Map<java.lang.String,ManagedResource> managedResources, java.util.List<java.lang.String> languages) throws java.io.IOException, SolrServiceException
java.io.IOExceptionSolrServiceExceptionprotected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> loadStopWordsFromConfiguration(FacetSearchConfig facetSearchConfig, java.util.Collection<java.lang.String> languages)
protected java.util.Set<java.lang.String> loadStopWordsFromServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath)
throws SolrServerException,
java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected void updateStopWordsOnServer(SolrClient solrClient,
java.lang.String indexName,
java.lang.String managedResourcePath,
java.util.Set<java.lang.String> stopWords,
java.util.Set<java.lang.String> serverStopWords)
throws SolrServiceException,
SolrServerException,
java.io.IOException
SolrServiceExceptionSolrServerExceptionjava.io.IOExceptionprotected java.lang.String encode(java.lang.String string)
throws SolrServiceException
SolrServiceExceptionprotected <any> executeGet(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path)
throws SolrServerException,
java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected void executePost(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path,
java.lang.Object payload)
throws SolrServerException,
java.io.IOException
SolrServerExceptionjava.io.IOExceptionprotected void executeDelete(SolrClient solrClient,
java.lang.String indexName,
java.lang.String path)
throws SolrServerException,
java.io.IOException
SolrServerExceptionjava.io.IOExceptionpublic 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 © 2018 SAP SE. All Rights Reserved.