You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Soeren Pekrul <so...@gmx.de> on 2008/02/28 01:16:23 UTC

Document.setBoost() doesn't work

I work with Lucene 2.0. I boost some documents:

Document doc = new Document();
// adding fields
doc.setBoost(2.0f);
indexwriter.addDocument(doc);

If I look to my index with Luke (0.6) the boost value of all documents 
is still 1.0.
How can I boost documents?

Thanks. Sören

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


RE: Document.setBoost() doesn't work

Posted by John Griffin <jg...@thebluezone.net>.
Soren,

Your documents are being boosted. Because of the way document boost values
immediately go through some calculations and are stored in the index Luke
will always show 1.o as the boost value. There has been some talk in the
recent past that this should be removed from Luke since it is actually
misleading. 

If you query your index and use the explain method o the results you will
see that they are being boosted.

Hope this helps

John G.

-----Original Message-----
From: Soeren Pekrul [mailto:soeren.pekrul@gmx.de] 
Sent: Wednesday, February 27, 2008 5:16 PM
To: java-user@lucene.apache.org
Subject: Document.setBoost() doesn't work

I work with Lucene 2.0. I boost some documents:

Document doc = new Document();
// adding fields
doc.setBoost(2.0f);
indexwriter.addDocument(doc);

If I look to my index with Luke (0.6) the boost value of all documents 
is still 1.0.
How can I boost documents?

Thanks. Sören

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