lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Libois <claude.lib...@guest.minfin.fed.be>
Subject Boost doesn't works
Date Mon, 28 Feb 2005 08:05:23 GMT
Hello. I'm using Lucene for an application and I want to boost the title of
my documents.
For that I use the setBoost method that is applied on the title field.
However when I look with luke(1.6) I don't see any boost on this field and
when
I do a search the score isn't change. What's wrong?
Here is the code where I set the boost factor.

public Document getDocument() throws TechnicalException {
        Document doc = new Document();
        log.trace(new TraceMessage("will  add title,resume,content,date to
the Lucene Document"));
        Field field = Field.UnStored("Content",content);
        doc.add(field);
        doc.add(Field.Text("Summary", summary));
        field = Field.Text("Title", title);
        field.setBoost(10);
        doc.add(field);
        return doc;

    }
Do I have to do something else to activate boosting?

Claude Libois
claude.libois@guest.minfin.fed.be
Technical associate - Unisys


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


Mime
View raw message