Class SolrStandaloneSearchProvider
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
-
- de.hybris.platform.solrfacetsearch.solr.impl.SolrStandaloneSearchProvider
-
- All Implemented Interfaces:
SolrSearchProvider
public class SolrStandaloneSearchProvider extends AbstractSolrSearchProvider
SolrSearchProviderimplementation for Solr Legacy Distribution and Replication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolrStandaloneSearchProvider.ClusterNodeResponse<T extends org.apache.solr.client.solrj.SolrResponse>protected static classSolrStandaloneSearchProvider.ClusterSolrClient-
Nested classes/interfaces inherited from interface de.hybris.platform.solrfacetsearch.solr.SolrSearchProvider
SolrSearchProvider.CommitType
-
-
Field Summary
-
Fields 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, SOLR_QUERY_SELECT_ALL, SYNONYM_SPLIT_CHAR, UTF8_ENCODING
-
-
Constructor Summary
Constructors Constructor Description SolrStandaloneSearchProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseClient(org.apache.solr.client.solrj.SolrClient solrClient)protected voidcloseClientForIndexing(org.apache.solr.client.solrj.SolrClient solrClient)protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase>
java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<T>>clusterRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, java.lang.String collection, java.util.List<java.lang.String> nodes)protected org.apache.solr.client.solrj.SolrClientcreateClient(SolrConfig solrConfig)protected org.apache.solr.client.solrj.SolrClientcreateClientForIndexing(SolrConfig solrConfig)voidcreateIndex(Index index)Creates an index (if it does not exist).voiddeleteIndex(Index index)Deletes an index (if it exists).protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doCheckIndexStatus(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doCreateIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doDeleteIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doReloadIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)voidexportConfig(Index index)Exports the configuration to a specific index.CachedSolrClientgetClient(Index index)ReturnsSolrClientfor specificIndex, that can be used for searches.CachedSolrClientgetClientForIndexing(Index index)ReturnsSolrClientfor specificIndex, that can be used for indexing.protected booleanindexExists(Index index, org.apache.solr.client.solrj.response.CoreAdminResponse response)protected voidvalidateConfiguration(SolrConfig solrConfig)-
Methods inherited from class de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
buildSynonyms, closeHttpClient, collectLanguages, commit, createHttpClient, deleteAllDocuments, deleteDocumentsByPk, deleteOldDocuments, encode, 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
-
-
-
-
Method Detail
-
getClient
public CachedSolrClient getClient(Index index) throws SolrServiceException
Description copied from interface:SolrSearchProviderReturnsSolrClientfor specificIndex, that can be used for searches.- Parameters:
index- - the index- Returns:
SolrClientinstance- Throws:
SolrServiceException- if an error occurs
-
createClient
protected org.apache.solr.client.solrj.SolrClient createClient(SolrConfig solrConfig)
-
closeClient
protected void closeClient(org.apache.solr.client.solrj.SolrClient solrClient)
-
getClientForIndexing
public CachedSolrClient getClientForIndexing(Index index) throws SolrServiceException
Description copied from interface:SolrSearchProviderReturnsSolrClientfor specificIndex, that can be used for indexing.- Parameters:
index- - the index- Returns:
SolrClientinstance- Throws:
SolrServiceException- if an error occurs
-
createClientForIndexing
protected org.apache.solr.client.solrj.SolrClient createClientForIndexing(SolrConfig solrConfig)
-
closeClientForIndexing
protected void closeClientForIndexing(org.apache.solr.client.solrj.SolrClient solrClient)
-
createIndex
public void createIndex(Index index) throws SolrServiceException
Description copied from interface:SolrSearchProviderCreates an index (if it does not exist).- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
deleteIndex
public void deleteIndex(Index index) throws SolrServiceException
Description copied from interface:SolrSearchProviderDeletes an index (if it exists).- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
exportConfig
public void exportConfig(Index index) throws SolrServiceException
Description copied from interface:SolrSearchProviderExports the configuration to a specific index.- Parameters:
index- - the index- Throws:
SolrServiceException- if an error occurs
-
validateConfiguration
protected void validateConfiguration(SolrConfig solrConfig)
-
indexExists
protected boolean indexExists(Index index, org.apache.solr.client.solrj.response.CoreAdminResponse response)
-
doCheckIndexStatus
protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doCheckIndexStatus(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)
-
doCreateIndex
protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doCreateIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)
-
doDeleteIndex
protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doDeleteIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)
-
doReloadIndex
protected java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doReloadIndex(Index index, CachedSolrClient solrClient, java.util.List<java.lang.String> nodes)
-
clusterRequest
protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase> java.util.List<SolrStandaloneSearchProvider.ClusterNodeResponse<T>> clusterRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, java.lang.String collection, java.util.List<java.lang.String> nodes)
-
-