Elastic search query for sorting results

Hi,

I am trying to regular match search on a single field from the index which has n-gram analyzer.
When I execute following query, the results are not sorted with string that has a perfect match on top.
What can be done to sort a field depending upon full match to partial matches ? i.e. if I have two documents with description fields as performance test and performance testing I'd like the result with performance test always on top.

GET spark-index/_search 
{
  "query": {
    "match": {
      "description": "test"
    }
  }
}

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