Find only those documents which do not contains id of some other nodes among results

Hi guys,

I just solved one problem and got into the other, but I hope this would be
a peace of cake for some of you with more experience with ES.
I have documents that look like this:
"title":"Document A",
"duplicates": []

"title":"Document B",

I'm using Java API to create a query which combines more like this text
query and different filters in order to select certain number of documents
with the highest score. In the given example document B is marked as
duplicate of document A, as it has a list "duplicateof" where id of
document A is stored. If these two documents are happened to be in the top
results I want to skip document B.

Does anybody have an idea how I can make this?


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
To view this discussion on the web visit
For more options, visit