Full text query multi_match document scores

Hey ElasticSearch Community,

I indexed documents of the following structure to ElasticSearch

"mappings" => [
    "properties" => [
        "title" => [
            "type" => "text"
        ],
        "tags" => [
            "type" => "text"
        ],
    ]
]

now I try to run a multi_match query against my index like so:

"must" => [
    "multi_match" => [
        "query" => "awesome dishwasher",
        "operator" => "or",
        "fields" => [
            "tags",
            "title",
        ]
    ]
]

I expect the query to return documents that contain either "awesome" or "dishwasher" or both of the words in either the title field or the tag field.

I expect the query to score documents, which contain both words, higher than documents that contain only one of the words.

For some reason the document scoring is not like I expect it to be. Can you give me a hint what I'm doing wrong here, and explain, what I have to do different.

Best regards, Internet Media

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

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