Package org.ametys.cms.search.solr
Interface SolrClientProvider
-
- All Known Implementing Classes:
DefaultSolrClientProvider
public interface SolrClientProvider
Component acting as a single entry point to get access to Solr clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getCollectionName()
Get the name of the collection to use.String
getCollectionName(String workspaceName)
Get the collection to use.org.apache.solr.client.solrj.SolrClient
getReadClient()
Get the "read" mode solr client.default org.apache.solr.client.solrj.SolrClient
getUpdateClient(String workspaceName)
Get a (default) Solr client suited to update.org.apache.solr.client.solrj.SolrClient
getUpdateClient(String workspaceName, boolean autoCommit)
Get a Solr client suited to update.
-
-
-
Method Detail
-
getReadClient
org.apache.solr.client.solrj.SolrClient getReadClient()
Get the "read" mode solr client.- Returns:
- the "read" mode solr client.
-
getUpdateClient
default org.apache.solr.client.solrj.SolrClient getUpdateClient(String workspaceName)
Get a (default) Solr client suited to update.- Parameters:
workspaceName
- The name of the workspace- Returns:
- a Solr client suited to update.
-
getUpdateClient
org.apache.solr.client.solrj.SolrClient getUpdateClient(String workspaceName, boolean autoCommit)
Get a Solr client suited to update.
You must call this method withfalse
value for argument `autocommit` so as to get a client that will not trigger any autocommit on Solr side.
Otherwise, calling this method withtrue
value for argument `autocommit` is equivalent to callinggetUpdateClient(String)
- Parameters:
workspaceName
- The name of the workspaceautoCommit
-false
so as to get a client that will not trigger any autocommit on Solr side.- Returns:
- a Solr client suited to update.
-
getCollectionName
String getCollectionName()
Get the name of the collection to use.- Returns:
- The name of the collection to search in.
-
getCollectionName
String getCollectionName(String workspaceName)
Get the collection to use.- Parameters:
workspaceName
- The workspace name.- Returns:
- The name of the collection to search in.
-
-