I have a pretty simple need to do a conditional update in Solr, which is easy to do in MySQL.
For example,
- I have 100 documents with a unique field
<id> - I am sending 10 documents, some of which may be duplicated by
<id>s, in which case Solr will update existing records with the same <id>s - I have a field called
<dateCreated>, and I would like to update only <doc>if the new one <dateCreated>is blurry than the old one <dateCreated>(this only applies to duplication <id>, of course)
How can I accomplish such a thing?
The context is trying to deal with the conditions of the race, resulting in several additions for the same identifier, but are executed in the wrong order.
Thanks.
source
share