Class SolrIndexWorkerUtil
java.lang.Object
com.broadleafcommerce.search.index.solr.worker.SolrIndexWorkerUtil
Utility class to handle common operations for Solr index worker classes, e.g.
SolrProductIndexWorker.
- Since:
- 2.1.2-GA, 2.0.3-GA
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SolrIndexWorkerProperties
void
writeDocumentsToSolrInChunks
(@NonNull Collection<? extends List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>>> indexablesById, @NonNull AtomicInteger processCount, @NonNull String collection, @NonNull String indexableType, @NonNull com.broadleafcommerce.search.index.core.document.DocumentBuilder<org.apache.solr.common.SolrInputDocument> documentBuilder, @NonNull com.broadleafcommerce.search.provider.solr.SolrIndexProvider solrIndexProvider) Rather than writing an indexable by ID to Solr or all the indexables at once, this method aggregates them into chunks to keep from sending excessively large requests to Solr or having poor performance by only sending a couple records at a time when grouped by ID.
-
Field Details
-
NO_COMMIT_WITHIN_TIME
protected static final int NO_COMMIT_WITHIN_TIME- See Also:
-
-
Constructor Details
-
SolrIndexWorkerUtil
-
-
Method Details
-
writeDocumentsToSolrInChunks
public void writeDocumentsToSolrInChunks(@NonNull @NonNull Collection<? extends List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>>> indexablesById, @NonNull @NonNull AtomicInteger processCount, @NonNull @NonNull String collection, @NonNull @NonNull String indexableType, @NonNull @NonNull com.broadleafcommerce.search.index.core.document.DocumentBuilder<org.apache.solr.common.SolrInputDocument> documentBuilder, @NonNull @NonNull com.broadleafcommerce.search.provider.solr.SolrIndexProvider solrIndexProvider) Rather than writing an indexable by ID to Solr or all the indexables at once, this method aggregates them into chunks to keep from sending excessively large requests to Solr or having poor performance by only sending a couple records at a time when grouped by ID. SeeSolrIndexWorkerProperties.getChunkSize(java.lang.String)
for configuring the chunk size globally or per indexable type. -
getProperties
-