Thank you Walter. I liked your solution! This is what I was looking for i.e.

&boost=log(sum(1,qty))

O. O.


Walter Underwood wrote
> The usual fix for this is log(1+qty). If you might have negative values,
> you can use log(max(1,qty)).
> 
> wunder
> Walter Underwood

> wunder@

> http://observer.wunderwood.org/
> 
> On Oct 20, 2014, at 3:04 PM, O. Olson <

> olson_ord@

> > wrote:
> 
>> I am considering using a boost as follows: 
>> 
>> &boost=log(qty)
>> 
>> Where qty is the quantity in stock of a given product i.e. qty could be
>> 0,
>> 1, 2, 3, … etc. The problem I see is that log(0) is -Infinity. Would this
>> be
>> a problem for Solr? For me it is not a problem because 
>> log(0) < log(1) < log(2) etc. 
>> 
>> I'd be grateful for any thoughts. One alternative is to use max e.g.
>> &boost=max(log(qty), -1) 
>> 
>> But still this would cause Solr to compute the -Infinity and then discard
>> it.  So can I use an expression for boost that would result in –Infinity? 
>> 
>> Thank you
>> O. O.
>>





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-there-a-problem-with-Infinity-as-boost-tp4165036p4165189.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to