Interface SolrSearchProvider

All Known Implementing Classes:
AbstractSolrSearchProvider, SolrCloudSearchProvider, SolrStandaloneSearchProvider, XmlExportSearchProvider

public interface SolrSearchProvider
Abstraction for different search provider implementations.
  • Method Details

    • resolveIndex

      Index resolveIndex(FacetSearchConfig facetSearchConfig, IndexedType indexedType, String qualifier)
      Resolves an index. Resolving an index only creates a search provider specific instance of Index.
      Parameters:
      facetSearchConfig - - the facet search configuration
      indexedType - - the indexed type
      qualifier - - the qualifier
      Returns:
      the index
    • getClient

      org.apache.solr.client.solrj.SolrClient getClient(Index index) throws SolrServiceException
      Returns SolrClient for specific Index, that can be used for searches.
      Parameters:
      index - - the index
      Returns:
      SolrClient instance
      Throws:
      SolrServiceException - if an error occurs
    • getClientForIndexing

      org.apache.solr.client.solrj.SolrClient getClientForIndexing(Index index) throws SolrServiceException
      Returns SolrClient for specific Index, that can be used for indexing.
      Parameters:
      index - - the index
      Returns:
      SolrClient instance
      Throws:
      SolrServiceException - if an error occurs
    • createIndex

      void createIndex(Index index) throws SolrServiceException
      Creates an index (if it does not exist).
      Parameters:
      index - - the index
      Throws:
      SolrServiceException - if an error occurs
    • deleteIndex

      void deleteIndex(Index index) throws SolrServiceException
      Deletes an index (if it exists).
      Parameters:
      index - - the index
      Throws:
      SolrServiceException - if an error occurs
    • exportConfig

      void exportConfig(Index index) throws SolrServiceException
      Exports the configuration to a specific index.
      Parameters:
      index - - the index
      Throws:
      SolrServiceException - if an error occurs
    • deleteAllDocuments

      void deleteAllDocuments(Index index) throws SolrServiceException
      Deletes all documents from an index.
      Parameters:
      index - - the index
      Throws:
      SolrServiceException - if an error occurs
    • deleteOldDocuments

      void deleteOldDocuments(Index index, long indexOperationId) throws SolrServiceException
      Deletes old documents from an index. Old documents are documents that were not created/updated since a given index operation.
      Parameters:
      index - - the index
      indexOperationId - - the index operation id
      Throws:
      SolrServiceException - if an error occurs
    • deleteDocumentsByPk

      void deleteDocumentsByPk(Index index, Collection<PK> pks) throws SolrServiceException
      Deletes documents matching the provided list of pks
      Parameters:
      index - - the index
      pks - - the pks list
      Throws:
      SolrServiceException - if an error occurs
    • commit

      void commit(Index index, SolrSearchProvider.CommitType commitType) throws SolrServiceException
      Performs a commit on the given index. An hard commit makes sure that indexed documents are persisted and visible, a soft commit makes sure indexed documents are visible.
      Parameters:
      index - - the index
      commitType - - the commit type
      Throws:
      SolrServiceException - if an error occurs
    • optimize

      void optimize(Index index) throws SolrServiceException
      Optimizes a given index. It does not wait for the operation to complete.
      Parameters:
      index - - the index
      Throws:
      SolrServiceException - if an error occurs