Forward slash and query_string


(Marc Magnin) #1

I have a couple of documents such as:

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

I'd like to select solely:

{"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"

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

Many thanks!


(system) #2

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