lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo Daviddi <rdavi...@gmail.com>
Subject Re: setBoost(float) in org.apache.lucene.document.Field cannot be applied to (double)???
Date Fri, 05 Aug 2005 12:11:19 GMT
It seems it doesn't change the boost factors and that is strange, I
did as in the manual, I thought it was easy, I just use:

fieldname.setBoost(1.2f);

and then I add to the doc that field, and I index the doc.
All the indexing process goes ok, only these boost factors are
different from what I do in the code.

Any idea?


On 8/4/05, Otis Gospodnetic <otis_gospodnetic@yahoo.com> wrote:
> Yes. use 1.2f there.  That method accepts floats, not doubles.  That
> could be an error in the Lucene book.
> 
> Otis
> 
> 
> --- Riccardo Daviddi <rdaviddi@gmail.com> wrote:
> 
> > Why I got this error by writing for example:
> >
> > Field senderNameField = Field.Text("senderName", senderName);
> > Field subjectField = Field.Text("subject", subject);
> > subjectField.setBoost(1.2);
> >
> > as in the manual lucene in action??
> >
> > 1.2 is a double, but the method wants a float?
> > --
> > Riccardo Daviddi
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 


-- 
Riccardo Daviddi
University of Siena - Information Engeneering
rdaviddi@gmail.com

---------------------------------------------------------------------
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