Elasticsearch + Kibana, sorting on uri yields no results. (uri isn't analyzed)
<p>I have a log of HTTP requests, one of the fields is a URI field. I want to get the average duration in ms for each URI. I set the y-axis in Kibana to 
<code>"Aggregation: Average , Field: durationInMs"</code>. </p>

<p>For the x-axis I have </p>

<pre><code>"Aggregation: terms, Field uri, Order by: metric average durationInMs, Order: descending: 5"
</code></pre>

<p><strong><em>Image to clarify:</em></strong></p>

<p><a href="https://i.stack.imgur.com/kTt2d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kTt2d.png" alt="enter image description here"></a></p>

<p>This gives me a result but it doesn't use the <strong>entire</strong> URI. It instead splits up the URI and matches parts of it. After a quick google I found "<a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-fields.html" rel="nofollow noreferrer">Multi-fields</a>" and I have added a URI.raw field on my index. The analyzed field warning disappeared but I get <strong>no</strong> result at all.</p>

<p>Any hints or tips?</p>

<p>lsc-logs2 mapping:</p>

<pre><code>{
  "lsc-logs2": {
    "mappings": {
      "httplogentry": {
        "properties": {
          "context": {
            "type": "string"
          },
          "durationInMs": {
            "type": "double"
          },
          "id": {
            "type": "long"
          },
          "method": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "startTime": {
            "type": "date",
            "format": "strict_date_optional_time||epoch_millis"
          },
          "status": {
            "type": "long"
          },
          "uri": {
            "type": "string",
            "fields": {
              "raw": {
                "type": "string",
                "index": "not_analyzed"
              }
            }
          },
          "username": {
            "type": "string"
          },
          "version": {
            "type": "long"
          }
        }
      }
    }
  }
}
</code></pre>

<p>An example document:</p>

<pre><code>{
    "_index": "lsc-logs2",
    "_type": "httplogentry",
    "_id": "1148440",
    "_score": 1,
    "_source": {
        "startTime": "2016-08-22T10:30:57.2298086+02:00",
        "context": "contexturi",
        "method": "GET",
        "uri": "http://uri/plannings/unassigned?date=2016-08-22T03:58:57.168Z&amp;page=1&amp;pageSize=9999",
        "username": "user",
        "source": "192.168.1.82",
        "durationInMs": 171.83710000000002,
        "status": 200,
        "id": 1148440,
        "version": 1
    }
}
</code></pre>