Regex kibana

Hello,
I am trying to create a regex query in kibana. I want to get a result which has sanitation followed by access meaning I am trying to find sanitation access*. I am entering the following query but I am not getting any hits.

GET /manifestation_v1/_search
{
  "query": {
    "regexp": {
      "bibliographicInformation.title": {
        "value": "sanitation access*",
        "flags": "ALL"
      }
    }
  }
}

Can anyone help me out with regex?

Welcome!

It depends on the mapping.
If you are using the default one, you should try against the field bibliographicInformation.title.keyword.

I tried against it It doesn't match. The regex which I am writing is it correct? As I have a whitespace in between the 2 words.

I'm not a regex person :grin: but if you would like someone to try your code you should provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

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