Discussion:
Is this a reasonable way to boost?
Michael Tracey
2013-11-07 22:51:27 UTC
Permalink
I'm trying to boost results slightly on a price (not currency) field that are closer to a certain value. I want results that are not too expensive or too inexpensive to be favored. Here is what we currently are trying:

bf=sub(1,abs(sub(15,price)))^0.2

where 15 is that "median" I want to boost towards. Is this a good way? I understand in older solr's it was common to use recip(ord()) for this but you shouldn't do so now.

Thanks for any comments or advice on improving this.

M.
Upayavira
2013-11-08 10:57:47 UTC
Permalink
Post by Michael Tracey
I'm trying to boost results slightly on a price (not currency) field that
are closer to a certain value. I want results that are not too expensive
bf=sub(1,abs(sub(15,price)))^0.2
where 15 is that "median" I want to boost towards. Is this a good way?
I understand in older solr's it was common to use recip(ord()) for this
but you shouldn't do so now.
Thanks for any comments or advice on improving this.
I think this is a case of "if it works". If it works for you, then
great.

What I would say though, is that if you have a lot of documents in your
index, consider pre-computing that field at index time, and boost on the
pre-computed value, as that will give you better performance.

Upayavira
Chris Hostetter
2013-11-18 22:07:36 UTC
Permalink
: > I'm trying to boost results slightly on a price (not currency) field that
: > are closer to a certain value. I want results that are not too expensive
: > or too inexpensive to be favored. Here is what we currently are trying:
: >
: > bf=sub(1,abs(sub(15,price)))^0.2

Hmm... using sub() for your outher most function doesn't make sense to me
... i think (based on the description of your goal) that you really want
to be using div() there.

I would also suggest that in general, using "bf" (which gives an additive
boost) probably isn't a good idea in 90% of the cases where you want to
boost something ... a multiplicitive boost using the "boost" param of
edismax, or wrapping your whole query in a {!boost} parser, is going to
make a lot more sense.

: What I would say though, is that if you have a lot of documents in your
: index, consider pre-computing that field at index time, and boost on the
: pre-computed value, as that will give you better performance.

This, in general, is great advice: anything you can pre-compute at index
time will save you processing/time at request time. But the caveat i would
like to point out is that with the query time function approach, the
"constant" (in this case 15) can actually be varried on a per user basis
-- ie: you can boost things differnetly for differnet people based on what
you know about them, either by explicitly asking them, or by analytics of
their past behavior.


I tried to cover all of these ideas here...

https://people.apache.org/~hossman/ac2012eu/
http://vimeopro.com/user11514798/apache-lucene-eurocon-2012/video/55822630





-Hoss

Continue reading on narkive:
Loading...