Scale scor of result


(Yur Gasparyan) #1

Hi all. I my case I have elastic search query look like this
$query = [
"index" => "my_index",
"type" => "q",
"body" => [
"query" => [
"dis_max" => [
"queries" => [
[
"match" => ["title" => "test"]
],
[
"match" => ["body" => "test"]
],
[
"match" => ["name" => "test"]
]
]
]
],
"min_score"=> 1
],
"size" => 1000,
];

I want to Increase priority of title result, as I want to multiply result of title by 2. Please help ! Thanks


(Mark Walkom) #2

Have you looked at boosting?
https://www.elastic.co/search?q=boost&section=Docs%2FElasticsearch%2FReference%2F5.4


(Yur Gasparyan) #3

Yes. But Can not create query. can You help me to create elastic query with boosting ,


(Mark Walkom) #4

Can you show us what you have so far, with the boosting changes you want?


(Yur Gasparyan) #5

I need to give priority to title , than to body . So I mean that i want to multiply title result score by 2 and the body score by 1.5


(system) #6

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