Custom score with multiple query


(Atharva Patel) #1

How to calculate a custom score which is kind of a formula that combines
scores from multiple queries. Each such query itself might have a custom
score script inside it. A short example will be great for explanation.

--


(Atharva Patel) #2

On Thursday, 30 August 2012 17:31:42 UTC+5:30, Atharva Patel wrote:

How to calculate a custom score which is kind of a formula that combines
scores from multiple queries. Each such query itself might have a custom
score script inside it. A short example will be great for explanation.

--


(Atharva Patel) #3

For example I want to find a score something like finalscore =
0.4customquery1 + 0.6customquery2;
How to achieve this with elasticsearch API?

On Thursday, 30 August 2012 17:31:42 UTC+5:30, Atharva Patel wrote:

How to calculate a custom score which is kind of a formula that combines
scores from multiple queries. Each such query itself might have a custom
score script inside it. A short example will be great for explanation.

--


(phill) #4

The word to search for on the ES website is boost. The simplest was to
combine queries is to use a boolean query called a boolQuery in ES.

-Paul
On 8/30/2012 5:20 AM, Atharva Patel wrote:

For example I want to find a score something like finalscore =
0.4customquery1 + 0.6customquery2;
How to achieve this with elasticsearch API?

--


(system) #5