tags:

views:

33

answers:

1

Hopefully an easy question: I have added some docs to the index, where every doc has a field prio, which is an integer between 1 and 5. There is also a text field for fulltext search.

What I want: multiply the prio-value with the score value and order the docs by that result.

what I tried: this and that :) last thing was q=whatever _val_:"product(prio, score)" which didn't work (unknown field score)

Thanks for your help!

+1  A: 

How about:

q={!boost b=fieldvalue(prio)}whatever

References: fieldvalue, BoostQParserPlugin.

Mauricio Scheffer
Thanks for your answer. I tried that before too, but reading the docs again (and again) I found my error: The prio field was stored but not indexed -> score was always 0.0. Thanks again..
harpax