catmanjan
(Jan Martin)
May 20, 2024, 4:36am
1
Hello our application pipes things directly to elasticsearch query strings like so:
"title:test and word:filter"
But in some cases we want to pipe the filter in such a way that it never returns a hit, e.g. something like:
"title:test AND impossible_match"
So the query will always return zero results.
Is there such a keyword?
Why run the search at all if you do not want any matches?
1 Like
catmanjan
(Jan Martin)
May 20, 2024, 6:22am
3
We still need Elasticsearch to register the search as we use it as a source of truth for auditing
dadoonet
(David Pilato)
May 20, 2024, 9:03am
4
May be instead of query string, switch in that case to an exists field query and ask for a non existing field?