Most efficient way to delete


(Robbie) #1

Hi,
I was wondering what is the most efficient way to use the deleteByQuery
API if I have to remove all documents which match the condition field1=
value1 AND field2 = value2 AND field3 = value3? Should I be using a
FilterBuilder to prepare a filter for this?

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b412a25b-86ae-4496-9e74-66c1ccfb3caf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Binh Ly-2) #2

Sure a bool filter with multiple must term filters should do it.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7c4c8dff-553d-485e-8b57-71de023387a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3