lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Humphreys <>
Subject Re: Conditional Add/Overwrite a document
Date Wed, 28 Oct 2015 22:31:16 GMT
Hi Gili,

It sounds like Solr's DocBasedVersionConstraintsProcessor is what you are
looking for:


On 29 October 2015 at 06:33, Gili Nachum <> wrote:

> Hi, Is there a conditional Add operation in Solr?
> My documents have "my_int" field and when re-adding a document with the
> same ID, I would to overwrite the existing doc only if the new doc my_int
> value is higher than that of the existing doc.
> As a naive solution, I could first read the existing doc to check if it
> exist or what the my_int value is, but I rather avoid the round trip, since
> I need to support a high index throughput.
> I'm willing to write some Solr plugin code if that's a must. If I do that
> which class should I extend/add? Would setting the my_int values as
> docValues help to make them more easily available to the indexer?

[image: Canva] <>
Empowering the world to design
Also, we're hiring. Apply here! <>
[image: Twitter] <>[image: Facebook] 
<>[image: LinkedIn] 
<>[image: Instagram] 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message