java-user@lucene.apache.org
[Top] [All Lists]

Re: How to give weight to document when adding to the index?

Subject: Re: How to give weight to document when adding to the index?
From: "gekkokid"
Date: Wed, 16 Nov 2005 05:33:56 -0000
boosting the document using the method setBoost(double), i think the param is a double but not sure, it works on both Document and Field objects


lil'example:
   Document d = new Document();

   d.add(Field.Keyword("name","gekkokid"));
   d.setBoost(1.1); // default is 1.0 i believe
   writer.addDocument(d);

_gk
----- Original Message ----- From: "Supheakmungkol SARIN" <supheakmungkol@xxxxxxxxx>
To: <java-user@xxxxxxxxxxxxxxxxx>
Sent: Wednesday, November 16, 2005 5:21 AM
Subject: How to give weight to document when adding to the index?


Dear Luceners,

I'd like to give different weight to each of the documents in the index. Is it possible to do this at the time we add the document to the index?

Regards,

Mungkol







---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>