Using field value for weighting


(Michael Korbakov) #1

Hi everyone.

Is it possible to use some numeric field value to rank the documents?
In my scenario I have field like "views_count" in my documents and I
want to use it's value with some weight in ranking. How can I add it
to the documents total score?

Thank you in advance

-- Michael Korbakov


(Clinton Gormley) #2

Hiya

Is it possible to use some numeric field value to rank the documents?
In my scenario I have field like "views_count" in my documents and I
want to use it's value with some weight in ranking. How can I add it
to the documents total score?

You want to use the new custom_score query:

Only available in master - will be in 0.9 when it is released in the
next few weeks

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Michael Korbakov) #3

Thank you. That's exactly what I was looking for.

On 1 ц▄ц┴ц░. 2010, at 18:07, Clinton Gormley clinton@iannounce.co.uk wrote:

Hiya

Is it possible to use some numeric field value to rank the documents?
In my scenario I have field like "views_count" in my documents and I
want to use it's value with some weight in ranking. How can I add it
to the documents total score?

You want to use the new custom_score query:

http://github.com/elasticsearch/elasticsearch/issues/220

Only available in master - will be in 0.9 when it is released in the
next few weeks

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(system) #4