You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Summer Shire <sh...@gmail.com> on 2014/01/28 23:11:44 UTC

solr scoring

Hi All,

I have a scenario where for example my document titles are 
1. battle of the zords
2. joes battle
3. who was in that crazy battle.

and if the search term is [battle]
I want to penalize the second and third document score because battle was matched further down than in the first documents case.

One way I can do this is store the title field and then retrieve the data at query time -  compute the relative position of the token 
 - and use it in my custom scorer.
But this is not just extremely slow but also my index is huge.

So I am planning to index payloads along with each token which will be some value relative to the term position in the original string.
and then use the payload information along with any other scoring i have.

Am I thinking on the right lines? is there anything better that i could do ?

Thanks
Summer