Hey,
I'm trying to find a way in ES or in Lucene to change the scoring of a multi
-value field.
Today it looks like that the multi-value field is being treated as bag of
words.
I want to be able to calculate the score per each value in the multi-value and
use the max scored value in the document score at the end.
For example:
- id: 1, Title: "new Sony Playstation", "ps 3", "game console for TV"
- id: 2, Title: "Sony Playstation", "console game 3", "brand new
Playstation 3" - id: 3, Title: "Brand sony console", "Best console sony playstation",
"new sony playstation 3"
Input keywords: "sony, "new", "playstation"
The order of the result should be: #1, #2, #3
ES will return the results as follow because #2, #3 has more keywords and
#1 has other keywords in the title which aren't relevant to what I'm
searching:
id: 2, Title: Sony Playstation, console game 3, brand new Playstation 3
id: 3, Title: Brand sony console, Best console sony playstation, new sony
playstation 3
id: 1, Title: new Sony Playstation, ps 3, game console for TV
Is there any specific query or customization I can do in order to change
the scoring? The only way I thought about is to break these title into
different documents which doesn't look like the best solution but it seemed
like there is no other option.
Thanks,
Itay
--