Interface DocumentAssignmentStrategy

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultDocumentAssignmentStrategy

public interface DocumentAssignmentStrategy extends Serializable
A strategy for assigning documents to Solr collections.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete all partitions created by this strategy.
    void
    deletePartition(String partitionId)
    Deletes a partition managed by this strategy.
    void
    Called in the background at a regular interval to allow the strategy to perform maintenance on the partitions.
    getOrCreatePartitionForDoc(com.lucidworks.apollo.common.pipeline.PipelineDocument doc)
    Returns the name of a Solr collection where a document should be assigned to based on this strategy.
    getPartitions(boolean activeOnly)
    Returns a list of Solr collection names where documents have been assigned by this strategy.
    getPartitionsForQuery(javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
    Returns a list of Solr collection names that need to be queried to satisfy the query criteria.
  • Method Details

    • getPartitions

      List<String> getPartitions(boolean activeOnly) throws Exception
      Returns a list of Solr collection names where documents have been assigned by this strategy.
      Throws:
      Exception
    • getPartitionsForQuery

      List<String> getPartitionsForQuery(javax.ws.rs.core.MultivaluedMap<String,String> queryParams) throws Exception
      Returns a list of Solr collection names that need to be queried to satisfy the query criteria.
      Throws:
      Exception
    • getOrCreatePartitionForDoc

      String getOrCreatePartitionForDoc(com.lucidworks.apollo.common.pipeline.PipelineDocument doc) throws Exception
      Returns the name of a Solr collection where a document should be assigned to based on this strategy.
      Throws:
      Exception
    • deletePartition

      void deletePartition(String partitionId) throws Exception
      Deletes a partition managed by this strategy.
      Throws:
      Exception
    • deleteAllPartitions

      void deleteAllPartitions() throws Exception
      Delete all partitions created by this strategy.
      Throws:
      Exception
    • doScheduledMaintenanceOnPartitions

      void doScheduledMaintenanceOnPartitions() throws Exception
      Called in the background at a regular interval to allow the strategy to perform maintenance on the partitions.
      Throws:
      Exception