lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: setBoost(float) in org.apache.lucene.document.Field cannot be applied to (double)???
Date Sun, 07 Aug 2005 17:44:24 GMT
: 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


Mime
View raw message