lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ype Kingma <ykin...@xs4all.nl>
Subject Re: Scoring documents by Click Count
Date Thu, 06 May 2004 17:58:25 GMT
On Thursday 06 May 2004 18:11, David Spencer wrote:
> Otis Gospodnetic wrote:
> >Sure.
> >On click, get document Id (not internal docId, but something you use as
> >s surrogate primary key) of the clicked document.  Retrieve the
> >document.  Pull out the value of 'clickCount' field.  +1 it.  Delete
> >the document, and re-add it (there is no 'update(Document)' method).
>
> Yeah but isn't the essence of it that Lucene is really not set up for
> dynamically adjusting the *score*?
> Also, above, to clarify, I think you're implying there are 2 entries for
> given doc - one Document for the indexed content, and one for the
> clickCount, as (from memory) I didn't think you could even re-add a doc
> w/o reindexing it...
>
> >Otis
> >
> >--- Centaur zeus <perseus_medusa@hotmail.com> wrote:
> >>Hi all,
> >>
> >>I want to integrate lucene into my web app. I would like to increase
> >>the
> >>score of the document when more people click on it. Could I implement
> >>that
> >>in lucene ?

Changing the click count this way is ok, but along with that you could
change the (field) norm for the document to increase it's score
in subsequent queries.
You can use Document.setBoost() and/or Field.setBoost() just before
IndexWriter.addDocument() to do this.

Regards,
Ype





---------------------------------------------------------------------
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