mvolikas commented on code in PR #1343:
URL: 
https://github.com/apache/incubator-stormcrawler/pull/1343#discussion_r1798311949


##########
external/solr/src/main/java/org/apache/stormcrawler/solr/persistence/SolrSpout.java:
##########
@@ -135,7 +157,8 @@ else if (resetFetchDateAfterNSecs != -1) {
 
         query.setQuery("*:*")
                 .addFilterQuery("nextFetchDate:[* TO " + lastNextFetchDate + 
"]")
-                .setSort("nextFetchDate", ORDER.asc);
+                .setSort("nextFetchDate", ORDER.asc)
+                .setParam("shards", "shard" + shardID);

Review Comment:
   The idea was to have the `shardID` default to 1 when the respective property 
is not set.
   
   - 
[Definition](https://github.com/apache/incubator-stormcrawler/pull/1343/files#diff-a499db920515864e856bb6616ff489daf6a58af1159b2f6057ea7da2273e774eR64)
   - [Getting the number of shards from the 
conf](https://github.com/apache/incubator-stormcrawler/pull/1343/files#diff-a499db920515864e856bb6616ff489daf6a58af1159b2f6057ea7da2273e774eR88-R94)
   
   The request to Solr will then work since the collection will have just one 
shard: `shard1`. I will add a test for this to make sure I'm not missing 
anything.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@stormcrawler.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to