Search for slash only

Hello!

Looking for date contains slash return a document:

GET /cdata*/_search
{
  "query": {
      "query_string": {
        "fields": [
          "callStartDate"
        ],
        "query": "3/24/2020",
        "analyzer": "keyword"
      }
    }
}

but looking for slash only return nothing:

GET /cdrdata*/_search
{
  "query": {
      "query_string": {
        "fields": [
          "callStartDate"
        ],
        "query": "//",
        "analyzer": "keyword"
      }
    }
}

I tried a lot of options in "query" such as: \\/, \\/*\\/, *\\/*\\/*\\/
I also tired to query callStartDate.keyword and _id (seems _id not support contians...)

Can you guide me please how to search for slash only? (actaully I want to get all dates with slash and delete them..)

Thank you!

P.S. callStartDate is of type string (and I can't change it to date now)

Finally I found a solution (Thanks to my manager :wink:)
Write it here, hope it's will useful for others too.
I don't know why regualr query failed but wildcard query solve the issue:

GET /_search
{
    "query": {
        "wildcard": {
            "callStartDate.keyword": {
                "value": "*/*"
            }
        }
    }
}

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