Document.setBoost() doesn't work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Document.setBoost() doesn't work

Soeren Pekrul
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Document.setBoost() doesn't work

John Griffin-3
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:[hidden email]]
Sent: Wednesday, February 27, 2008 5:16 PM
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]