# Forward slash and query\_string

**URL:** <https://discuss.elastic.co/t/forward-slash-and-query-string/120028>\
**Category:** Elasticsearch\
**Created:** [February 15, 2018, 4:49pm UTC](https://discuss.elastic.co/t/forward-slash-and-query-string/120028 "2018-02-15T16:49:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Magnin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marc_magnin/32/27786_2.png) [@Marc\_Magnin](https://discuss.elastic.co/u/Marc_Magnin)\
**Post date:** [February 15, 2018, 4:49pm UTC](https://discuss.elastic.co/t/forward-slash-and-query-string/120028/1 "2018-02-15T16:49:03Z")

</div>

I have a couple of documents such as:

```auto
{"n": "disk_Free{hostname='woot',mountpoint='/run'}"}
{"n": "disk_Free{hostname='woot',mountpoint='/run/lock'}"}

```

I'd like to select solely:

```auto
{"n": "disk_Free{hostname='woot',mountpoint='/run'}"}

```

I've tried this so far but it retrieve all the doc with "mountpoint" value that starts with "/run"

```auto
{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "default_operator": "AND",
            "default_field": "n",
            "query": "(\"mountpoint=\\/run\") AND (hostname=woot)"
          }
        }
      ]
    }
  }
}

```

Many thanks!

---

<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:** [March 15, 2018, 4:49pm UTC](https://discuss.elastic.co/t/forward-slash-and-query-string/120028/2 "2018-03-15T16:49:07Z")

</div>

Closed on March 15, 2018, 4:49pm UTC

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