rzo1 commented on code in PR #2326:
URL: https://github.com/apache/stormcrawler/pull/2326#discussion_r4549918280
##########
external/solr/src/main/java/org/apache/stormcrawler/solr/persistence/StatusUpdaterBolt.java:
##########
@@ -125,6 +125,12 @@ public void store(
doc.setField("nextFetchDate", nextFetch.get());
}
+ // a discovered URL must not overwrite the status of a URL already in
the collection,
+ // a negative version only adds the document if it does not exist yet
+ if (status == Status.DISCOVERED) {
+ doc.setField("_version_", -1L);
Review Comment:
Done, it uses `CommonParams.VERSION_FIELD` from SolrJ now.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]