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@yahoo.com>
To: <java-user@lucene.apache.org>
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@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
|