Interface SolrClientProvider

All Known Implementing Classes:
DefaultSolrClientProvider

public interface SolrClientProvider
Component acting as a single entry point to get access to Solr clients.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The component role.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the name of the collection to use.
    getCollectionName(String workspaceName)
    Get the collection to use.
    org.apache.solr.client.solrj.SolrClient
    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.
  • Field Details

    • ROLE

      static final String ROLE
      The component role.
  • Method Details

    • 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 with false value for argument `autocommit` so as to get a client that will not trigger any autocommit on Solr side.
      Otherwise, calling this method with true value for argument `autocommit` is equivalent to calling getUpdateClient(String)
      Parameters:
      workspaceName - The name of the workspace
      autoCommit - false so as to get a client that will not trigger any autocommit on Solr side.
      Returns:
      a Solr client suited to update.
    • getCollectionName

      Get the name of the collection to use.
      Returns:
      The name of the collection to search in.
    • getCollectionName

      Get the collection to use.
      Parameters:
      workspaceName - The workspace name.
      Returns:
      The name of the collection to search in.