Regexp containing double quotes

Hello,
I am trying to search values that contains numbers or numbers in a quotes (no other character types except whitespaces). I was not able to use double-quotes character in character class. I have tried both

\" and \\\"

and no combination works.
Is it possible? I the end, I would like to match 123, "123 ", 1 2 "3" etc.
Thanks.

Does not match anything:

GET myindex/_search
{
  "query": {
    "regexp": {
      "search_query": {
        "value": "[\"]+"
       }
    }
  }
}

It’s probably because you’re searching an indexed field that threw away the quotation characters?
What does your index mapping look like for the field?

1 Like

Thank You so much Mark. I am ES beginner and was not aware of that.
After few hours with mapping / indexing / DSL documentation, this really was the problem.
There are filters applied to it.

1 Like

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