Interface DocumentAssignmentStrategy
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultDocumentAssignmentStrategy
A strategy for assigning documents to Solr collections.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete all partitions created by this strategy.voiddeletePartition(String partitionId) Deletes a partition managed by this strategy.voidCalled 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
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 ExceptionReturns 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
Deletes a partition managed by this strategy.- Throws:
Exception
-
deleteAllPartitions
Delete all partitions created by this strategy.- Throws:
Exception
-
doScheduledMaintenanceOnPartitions
Called in the background at a regular interval to allow the strategy to perform maintenance on the partitions.- Throws:
Exception
-