Find out which terms were not found

Is there a way to know which terms were not found?

If I have something like this:

"filter":{  
    "terms":{  
          "productNo":[ 
               "1234567890", "0987654321"
          ]
    }
 }

and I got results for 1234567890, but not for 0987654321, how can I know that?

1 Like

You can potentially do that by using instead a bool query with should clauses.
Use then term queries (instead of terms query) and use named queries feature.

The result will come back with queries which matched. Just "negate" that result in your application.

My 2 cents

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.