Search with atmost n terms match

Like the condition on match Query that sets a minimum terms that Should
match, is there a way to specify Most terms that should match.
for example :

I have a Signature property of a document that represents the top
significant terms on the document(based on tfidf). This field is indexed
in the search index.
I want to get all documents that have a minimum overlap of 5 terms in this
and a maximum overlap of 56 terms.
Anything beyond 56 terms might indicate the two documents are too
similar/duplicates/near duplicates.

I want to achieve this via search and not via reindexing of the
content(production issues prevent from reindexing). Is there a way to do
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