# Search for slash only

**URL:** <https://discuss.elastic.co/t/search-for-slash-only/235160>\
**Category:** Elasticsearch\
**Created:** [June 1, 2020, 12:05pm UTC](https://discuss.elastic.co/t/search-for-slash-only/235160 "2020-06-01T12:05:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [June 1, 2020, 12:05pm UTC](https://discuss.elastic.co/t/search-for-slash-only/235160/1 "2020-06-01T12:05:37Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [June 1, 2020, 1:38pm UTC](https://discuss.elastic.co/t/search-for-slash-only/235160/2 "2020-06-01T13:38:49Z")

</div>

Finally I found a solution (Thanks to my manager 😉)  
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": "*/*"
            }
        }
    }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 29, 2020, 1:38pm UTC](https://discuss.elastic.co/t/search-for-slash-only/235160/3 "2020-06-29T13:38:50Z")

</div>

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