Interface SolrSearchProvider

    • Method Detail

      • resolveIndex

        Index resolveIndex​(FacetSearchConfig facetSearchConfig,
                           IndexedType indexedType,
                           java.lang.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
      • 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,
                                 java.util.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