On 5/22/2018 6:35 PM, Jay Potharaju wrote:
I have a quick question about deletebyQuery vs deleteById. When using
deleteByQuery, if query is id:123 is that same as deleteById in terms of
performance.

If there is absolutely nothing else happening to update the index, the difference between the two would probably be outside normal human perception of time -- I think you'd only be able to see the difference by measuring it with software, and you might need something that can show time units below one millisecond.  On a query that matches a lot of documents, the difference might be more pronounced, but likely still pretty small.

The issue with DBQ, which I already explained to you on another mailing list thread, is that DBQ can interact badly with other operations, segment merges in particular.  The delete itself won't take very long, but the simple fact that DBQ was used might result in a noticeable pause in your indexing operations.

http://lucene.472066.n3.nabble.com/Async-exceptions-during-distributed-update-td4388725.html#a4388787

As mentioned there, the pauses don't happen with id-based delete.

Thanks,
Shawn

Reply via email to