Class SolrStandaloneSearchProvider
java.lang.Object
de.hybris.platform.solrfacetsearch.solr.impl.AbstractSolrSearchProvider
de.hybris.platform.solrfacetsearch.solr.impl.SolrStandaloneSearchProvider
- All Implemented Interfaces:
SolrSearchProvider
SolrSearchProvider implementation for Solr Legacy Distribution and Replication.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSolrStandaloneSearchProvider.ClusterNodeResponse<T extends org.apache.solr.client.solrj.SolrResponse>protected static classNested 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, 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 voidcloseClientForIndexing(org.apache.solr.client.solrj.SolrClient solrClient) protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase>
List<SolrStandaloneSearchProvider.ClusterNodeResponse<T>>clusterRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, String collection, List<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 List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doCheckIndexStatus(Index index, CachedSolrClient solrClient, List<String> nodes) protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doCreateIndex(Index index, CachedSolrClient solrClient, List<String> nodes) protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doDeleteIndex(Index index, CachedSolrClient solrClient, List<String> nodes) protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>>doReloadIndex(Index index, CachedSolrClient solrClient, List<String> nodes) 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.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, 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
-
Constructor Details
-
SolrStandaloneSearchProvider
public SolrStandaloneSearchProvider()
-
-
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
-
createClient
-
closeClient
protected void closeClient(org.apache.solr.client.solrj.SolrClient solrClient) -
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
-
createClientForIndexing
-
closeClientForIndexing
protected void closeClientForIndexing(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.CoreAdminResponse response) -
doCheckIndexStatus
protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doCheckIndexStatus(Index index, CachedSolrClient solrClient, List<String> nodes) -
doCreateIndex
protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doCreateIndex(Index index, CachedSolrClient solrClient, List<String> nodes) -
doDeleteIndex
protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doDeleteIndex(Index index, CachedSolrClient solrClient, List<String> nodes) -
doReloadIndex
protected List<SolrStandaloneSearchProvider.ClusterNodeResponse<org.apache.solr.client.solrj.response.CoreAdminResponse>> doReloadIndex(Index index, CachedSolrClient solrClient, List<String> nodes) -
clusterRequest
protected <T extends org.apache.solr.client.solrj.response.SolrResponseBase> List<SolrStandaloneSearchProvider.ClusterNodeResponse<T>> clusterRequest(org.apache.solr.client.solrj.SolrRequest<T> request, CachedSolrClient solrClient, String collection, List<String> nodes)
-