Class SolrCloudSearchProvider
java.lang.Object
de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
de.hybris.platform.solrfacetsearch.solr.impl.SolrCloudSearchProvider
- All Implemented Interfaces:
SolrSearchProvider
SolrSearchProvider implementation for Solr Cloud.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSolrCloudSearchProvider.CloudResponse<T extends org.apache.solr.client.solrj.SolrResponse>Nested classes/interfaces inherited from interface de.hybris.platform.solrfacetsearch.solr.SolrSearchProvider
SolrSearchProvider.CommitType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final intprotected static final intprotected static final intprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
DEFAULT_ALIVE_CHECK_INTERVAL, DEFAULT_CONFIGSET_PROPERTY, DEFAULT_CONFIGSET_VALUE, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_MAX_CONNECTIONS, DEFAULT_MAX_CONNECTIONS_PER_HOST, DEFAULT_SOCKET_TIMEOUT, INDEX_PARAM, JSON_CONTENT_TYPE, MANAGED_IGNORE_CASE_FIELD, MANAGED_INIT_ARGS_FIELD, MANAGED_LIST_FIELD, MANAGED_MAP_FIELD, MANAGED_RESOURCES_PATH, MANAGED_RESOURCES_ROOT_FIELD, MANAGED_STOP_WORDS_IGNORE_CASE_KEY, MANAGED_STOP_WORDS_PATH, MANAGED_STOP_WORDS_ROOT_FIELD, MANAGED_STOP_WORDS_TYPE, MANAGED_SYNONYMS_IGNORE_CASE_KEY, MANAGED_SYNONYMS_PATH, MANAGED_SYNONYMS_ROOT_FIELD, MANAGED_SYNONYMS_TYPE, PERCENT_CHAR, SOLR_QUERY_SELECT_ALL, SYNONYM_SPLIT_CHAR, UTF8_ENCODING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseClient(org.apache.solr.client.solrj.SolrClient solrClient) protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase>
SolrCloudSearchProvider.CloudResponse<T>cloudRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, String collection) protected org.apache.solr.client.solrj.impl.CloudSolrClientcreateClient(SolrConfig solrConfig, SolrClientConfig solrClientConfig) voidcreateIndex(Index index) Creates an index (if it does not exist).voiddeleteIndex(Index index) Deletes an index (if it exists).protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse>doCreateIndex(Index index, CachedSolrClient solrClient) protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse>doDeleteIndex(Index index, CachedSolrClient solrClient) protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse>doListIndexes(CachedSolrClient solrClient) protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse>doReloadIndex(Index index, CachedSolrClient solrClient) voidexportConfig(Index index) Exports the configuration to a specific index.ReturnsSolrClientfor specificIndex, that can be used for searches.getClientForIndexing(Index index) ReturnsSolrClientfor specificIndex, that can be used for indexing.protected booleanindexExists(Index index, org.apache.solr.client.solrj.response.CollectionAdminResponse response) protected BooleanresolveAutoAddReplicas(Index index) protected IntegerresolveNumShards(Index index) protected IntegerresolveReplicationFactor(Index index) protected voidvalidateConfiguration(SolrConfig solrConfig) Methods inherited from class de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
buildSynonyms, closeHttpClient, collectLanguages, commit, createHttpClient, deleteAllDocuments, deleteDocumentsByPk, deleteOldDocuments, encode, encodePath, executeDelete, executeGet, executePost, expandSynonyms, exportConfig, exportStopWords, exportSynonyms, getConfigurationService, getIndexNameResolver, getIntegerValue, getSolrClientPool, getSolrFacetSearchConfigDao, loadManagedResourcesFromServer, loadStopWordsFromConfiguration, loadStopWordsFromServer, loadSynonymsFromConfiguration, loadSynonymsFromServer, optimize, resolveConfigSet, resolveIndex, setConfigurationService, setIndexNameResolver, setSolrClientPool, setSolrFacetSearchConfigDao, updateStopWordsOnServer, updateSynonymsOnServer
-
Field Details
-
CREATE_INDEX_MAX_RETRIES
protected static final int CREATE_INDEX_MAX_RETRIES- See Also:
-
NUMBER_OF_SHARDS_PARAM
- See Also:
-
DEFAULT_NUMBER_OF_SHARDS
protected static final int DEFAULT_NUMBER_OF_SHARDS- See Also:
-
REPLICATION_FACTOR_PARAM
- See Also:
-
DEFAULT_REPLICATION_FACTOR
protected static final int DEFAULT_REPLICATION_FACTOR- See Also:
-
AUTO_ADD_REPLICAS_PARAM
- See Also:
-
-
Constructor Details
-
SolrCloudSearchProvider
public SolrCloudSearchProvider()
-
-
Method Details
-
getClient
Description copied from interface:SolrSearchProviderReturnsSolrClientfor specificIndex, that can be used for searches.- Parameters:
index- - the index- Returns:
SolrClientinstance- Throws:
SolrServiceException- if an error occurs
-
getClientForIndexing
Description copied from interface:SolrSearchProviderReturnsSolrClientfor specificIndex, that can be used for indexing.- Parameters:
index- - the index- Returns:
SolrClientinstance- Throws:
SolrServiceException- if an error occurs
-
createClient
protected org.apache.solr.client.solrj.impl.CloudSolrClient createClient(SolrConfig solrConfig, SolrClientConfig solrClientConfig) -
closeClient
protected void closeClient(org.apache.solr.client.solrj.SolrClient solrClient) -
createIndex
Description copied from interface:SolrSearchProviderCreates an index (if it does not exist).- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
deleteIndex
Description copied from interface:SolrSearchProviderDeletes an index (if it exists).- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
exportConfig
Description copied from interface:SolrSearchProviderExports the configuration to a specific index.- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
validateConfiguration
-
indexExists
protected boolean indexExists(Index index, org.apache.solr.client.solrj.response.CollectionAdminResponse response) -
doListIndexes
protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse> doListIndexes(CachedSolrClient solrClient) -
doCreateIndex
protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse> doCreateIndex(Index index, CachedSolrClient solrClient) -
doDeleteIndex
protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse> doDeleteIndex(Index index, CachedSolrClient solrClient) -
doReloadIndex
protected SolrCloudSearchProvider.CloudResponse<org.apache.solr.client.solrj.response.CollectionAdminResponse> doReloadIndex(Index index, CachedSolrClient solrClient) -
cloudRequest
protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase> SolrCloudSearchProvider.CloudResponse<T> cloudRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, String collection) -
resolveNumShards
-
resolveReplicationFactor
-
resolveAutoAddReplicas
-