lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Haruska <jharu...@gmail.com>
Subject Re: Negative boosting?
Date Thu, 28 Oct 2004 18:43:17 GMT
You'll have to run tests but it shouldn't. All it does is change the
NUMBER token to accept an optional "-" in front of a number. So,
existing queries with no negative numbers should not be impacted.


On Thu, 28 Oct 2004 13:50:47 -0400, Terry Steichen <terry@net-frame.com> wrote:
>  
> Jason, 
>   
> Thanks for the info.  I'll try it. 
>   
> Do you know if the change you describe has any impact on existing queries
> (other than to support negative boosting, if that's specified)?  In other
> words, if I apply this change to existing queries, will I likely see any
> changes in results because of the change? 
>   
> Regards, 
>   
> Terry
> 
>  
>  
> ----- Original Message ----- 
> From: Jason Haruska 
> To: Lucene Users List 
> Sent: Thursday, October 28, 2004 1:23 PM 
> Subject: Re: Negative boosting? 
> 
> Hi Terry,
> 
> I know this is an old message on the list but it does not look like
> anyone responded to your request. I had to do negative boosting for my
> search functionality as well so I'd like to share the modification to
> QueryParser.jj to make it work. Find your <Boost> TOKEN and change it
> to:
> 
> <Boost> TOKEN : {
> <NUMBER:    (["-"])? (<_NUM_CHAR>)+ ( "." (<_NUM_CHAR>)+ )? > : DEFAULT
> }
> 
> 
> This simply allows an optional negative sign in front of a boost
> value. After stepping through the program I've seen the
> negative value carry through to the weight calculation.
> 
> Hope this helps.
> 
> ------- Start Quote --------
> I've often found the use of query-based boosting to be very
> beneficial.  This is particularly so when it's easy to identify the
> term that I want to stand out as a primary selector.
> 
> However, I've come across quite a few other cases where it would be
> easier (and more logical) to apply a negative boost - to de-emphasize
> the match when the term is present.
> 
> Is it possible to apply a negative boost (It doesn't seem to work),
> and if not, would it break anything significant [sic] if that were added?
> 
> Regards,
> 
> Terry
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message