I am trying to use a regex filter to do a match all strings except a string.
My regexp is [^(hello)].
I don't get any responses back. I do see there are documents which match this regex.
I am trying to use a regex filter to do a match all strings except a string.
My regexp is [^(hello)].
I don't get any responses back. I do see there are documents which match this regex.
I think your regex might not be correct. As far as I can see it matches any character not in the list (helo), so it will return documents with terms like "a" or "x". Having said that, using regex query to get documents not matching anything might not be the right approach. Have you tried using bool
query with a must_not
clause?
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.