title: Elastic search sorting not working as expected
body: <p>I am using elastic search version 1.2.1 and trying to sort results on an integer field but it's not working the way I believe it has to and I can't sort in asc or desc order. I am using Sense extension of Chrome and Elastic search listens port 9200 at localhost.</p>
  
  <p>Here's how I defined index:</p>
  
  <pre><code>PUT keyword_test
  </code></pre>
  
  <p>Then I added mapping for keyword_test index:</p>
  
  <pre><code>PUT /keyword_test/_mapping/keyword
  {
      "keyword": {
          "properties" : {
              "id": {
                  "type": "string"
              },
              "search_date": {
                  "type": "string"
              },
              "keyword": {
                  "type": "string",
                  "index": "analyzed"
              },
              "count": {
                  "type": "integer"
              }
          }
      }
  }
  </code></pre>
  
  <p>Then I added different keywords with different counts and try to search among them with the query below:</p>
  
  <pre><code>GET _search 
  {
      "sort": {
          "count": {
              "order": "asc",
              "ignore_unmapped": true
          }
      },
      "query": {
          "fuzzy": {
             "keyword": "iphone"
          }
      }
  }
  </code></pre>
  
  <p>I get the result below: </p>
  
  <pre><code>"hits": {
        "total": 3,
        "max_score": null,
        "hits": [
           {
              "_index": "keyword_test",
              "_type": "keyword",
              "_id": "8",
              "_score": null,
              "_source": {
                 "id": 8,
                 "count": 9000,
                 "keyword": "iphone 5s",
                 "search_date": "2015-05-05"
              },
              "sort": [
                 9000
              ]
           },
           {
              "_index": "keyword_test",
              "_type": "keyword",
              "_id": "10",
              "_score": null,
              "_source": {
                 "id": 10,
                 "count": 9500,
                 "keyword": "iphone 6 plus",
                 "search_date": "2015-05-05"
              },
              "sort": [
                 9500
              ]
           },
           {
              "_index": "keyword_test",
              "_type": "keyword",
              "_id": "9",
              "_score": null,
              "_source": {
                 "id": 9,
                 "count": 9100,
                 "keyword": "iphone 6",
                 "search_date": "2015-05-05"
              },
              "sort": [
                 9100
              ]
           }
        ]
     }
  </code></pre>
  
  <p>Result should be 9000, 9100, 9500 order but it is in 9000, 9500, 9100 order. I also get SearchParseException if I remove ignore_unmapped. What should I do? Am I missing some mapping for count field? Any help would be appreciated, thanks.</p>