Excluding search data while searching data in elastic search


(Himanshi Jain) #1

We need to construct a json query string such that it should return the results which don't contain the search term anywhere in the document.

Can you please help us using Query DSL?


(Ramy) #2

Try to use the simple query string query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#_simple_query_string_syntax

you are able to negates a search token.


(system) #3