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 Sun, 07 Aug 2005 17:52:33 GMT
Ah, ok.

So what I am doing is correct, just the way to see the boost factor
was uncorrect.

sorry if I do newbie questions...

On 8/7/05, Chris Hostetter <hossman_lucene@fucit.org> wrote:
> : Field f = Field.Text("boostfield", "text");
> : f.setBoost(3.0f);
> : document.add(f);
> 
> : if then i try to get the boost factor of the boostfield
> :
> : System.out.println(IndexReader.open(indexDir).document(0).getField("boostfield").getBoost());
> :
> : for the only one document indexed I get 1.0 instead of 3.0!
> :
> : where is the error?
> 
> Did you read the documentation for getBoost?
> 
> http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Document.html#getBoost()
> 
> if you search past messages for getBoost and setBoost you should be able
> to find some explanations of how Document based boosts (as opposed to
> Query boosts) are used at indexing time.
> 
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> 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