lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: problem with field.setboost(5.0f) on lucene 2.00
Date Thu, 01 Feb 2007 13:12:08 GMT
I haven't played with boosts, but I suspect your ordering is wrong. You've
already added the field to the document before you set the boost. Try
Field f = new Field()...

f.setBoost()

doc.add(f).

writer.addDoc(doc)..

Best
Erick

On 2/1/07, liquideshark <tandimail@gmail.com> wrote:
>
>
> iam building up a search engine using lucene 2.0, and iam having problem
> using the term boost "setboost" a part of my code is :
> and my code is :
>
> doc.add(new
> Field("title",httpd.getTitle(),Field.Store.YES,Field.Index.TOKENIZED ));
> doc.getField("title").setboost(5.0f);//  <=== the boost wont update to 5.0
> it remain 1.0
> writer.addDocument(doc);
> writer.optimize();
> writer.close();
>
> but when i look up in the index created the field title is still 1.0
> can some one help me thx
> --
> View this message in context:
> http://www.nabble.com/problem-with-field.setboost%285.0f%29-on-lucene-2.00-tf3154250.html#a8746530
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message