Multi match query and the scoring

I have couple documents in the index, and 2 of them are

{
          "id" : "c0706549-d06c-4043-8086-1b4b3ec1ef95",
          "title" : "Google Pixel XL",
          "memory" : "4GB",
          "quantity" : 3
}
{
          "id" : "23ecaecd-6b3f-4592-b79f-f46a20157221",
          "title" : "Google Pixel XL",
          "memory" : "6GB",
          "quantity" : 1
}

And for the query

{
  "query": { "multi_match": { "query": "pixel xl 6gb", "fields": ["title", "memory"] } }
}

I get the response

{
        "_index" : "my_index",
        "_type" : "_doc",
        "_id" : "c0706549-d06c-4043-8086-1b4b3ec1ef95",
        "_score" : 2.4280763,
        "_source" : {
          "id" : "c0706549-d06c-4043-8086-1b4b3ec1ef95",
          "title" : "Google Pixel XL",
          "memory" : "4GB",
          "quantity" : 3
        }
      },
      {
        "_index" : "my_index",
        "_type" : "_doc",
        "_id" : "23ecaecd-6b3f-4592-b79f-f46a20157221",
        "_score" : 2.4280763,
        "_source" : {
          "id" : "23ecaecd-6b3f-4592-b79f-f46a20157221",
          "title" : "Google Pixel XL",
          "memory" : "6GB",
          "quantity" : 1
        }
      }

But I expect that the document with the memory field 6GB will be on top, can you please advise why this happens and how to fix it?

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