lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Field Boosting
Date Fri, 18 Nov 2005 13:39:44 GMT
Daniel,

As I hope you've seen from the other messages on this thread, this is  
by design.

What you've shown is _not_ boost working improperly.  Boosts are part  
of the score via the fieldNorm value, and I'm certain that your  
boosts are being taking into account for scoring.  Boosts are not  
retrievable as-is from the Document object after a search.  We should  
javadoc that getter more clearly and note that it is really only  
valid when you create a Document, not when you retrieve an existing one.

     Erik


On 18 Nov 2005, at 07:08, Daniel.Clark@sybase.com wrote:

> titleField.setBoost((float)1.8);
> doc.add(titleField);
>
> keywordField.setBoost((float)1.6);
> doc.add(keywordField);
>
> summaryField.setBoost((float)1.2);
> doc.add(summaryField);
>
> When searching.
>
> field.getBoost() always = 1.0
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Daniel Clark, Senior Consultant
> Sybase Federal Professional Services
> 6550 Rock Spring Drive, Suite 800
> Bethesda, MD  20817
> Office - (301) 896-1103
> Office Fax - (301) 896-1604
> Mobile - (703) 403-0340
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>              Erik Hatcher
>              <erik@ehatchersol
>               
> utions.com>                                                To
>                                        java-user@lucene.apache.org
>              11/17/2005  
> 08:46                                           cc
>              AM
>                                                                     
> Subject
>                                        Re: Field Boosting
>              Please respond to
>              java-user@lucene.
>                 apache.org
>
>
>
>
>
>
>
> Daniel,
>
> Could you give us a test case that shows the boost not working  
> properly?
>
> I'm using document level boosting (which is really what field level
> boosting does under the covers) in some of my applications and it is
> working as expected.
>
>      Erik
>
>
> On 17 Nov 2005, at 05:39, Daniel.Clark@sybase.com wrote:
>
>
>>
>> When I boost fields while indexing, the fields still have a boost
>> of 1.0
>> during searching.  When I view the values via Luke, it confirms the
>> value
>> of 1.0.  Do I have to boost it agin during search?  I want certain
>> fields
>> to have higher priority/score during search.  How do I get it to
>> work?  I'm
>> using version 1.4.3.  Any help will be appreciated.
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Daniel Clark, Senior Consultant
>> Sybase Federal Professional Services
>> 6550 Rock Spring Drive, Suite 800
>> Bethesda, MD  20817
>> Office - (301) 896-1103
>> Office Fax - (301) 896-1604
>> Mobile - (703) 403-0340
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Mime
View raw message