DSL Query and multi_match

Hi,

I have created an index with multiple field, each field is used for search but with different boost.

For exemple, if i want to search "green mouse". i want a better score for document that contains "green" and "mouse" on same field or different fields.
and after have document (but with lower score) that contains green multiple times or mouse multiples times.

I really don't know how doing that, my current DSL query is

            "should" => [
                [
                    'multi_match' => [
                        "fuzziness" => "auto",
                        "prefix_length" => 3,
                        "query" => "green mouse",
                        "type" => "most_fields",
                        "operator"=> "AND",
                        'boost' => 10
                    ]
                ],
            "must"=>
                [
                    'multi_match' => [
                        "fuzziness" => "auto",
                        "prefix_length" => 3,
                        "query" => "green mouse",
                        "type" => "most_fields"
                    ]
                ]
            ]

Thanx for help and sorry for my english (I am french)

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