lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stoppelman" <stop...@gmail.com>
Subject Re: Boosting using an external data source
Date Tue, 05 Feb 2008 00:06:00 GMT
If anyone was wondering how I dealt with this I ended up extending the
TermQuery class and overridding the tf() and idf() functions
like in FuzzyLikeThisQuery.

See FuzzyTermQuery for how they use the SimilarityDelegator object:
contrib/queries/src/java/org/apache/lucene/search/FuzzyLikeThisQuery.java

-M

On Feb 3, 2008 8:21 PM, Michael Stoppelman <stopman@gmail.com> wrote:

> I've created a mapping of query terms to clusters with corresponding
> strength values that I want to integrate into lucene
> scoring so I can boost documents that match the clusters. I would like to
> give a boost based on the normalized score.
> In my setup, each document has a field with the clusters their assigned to
> which is a string that contains numbers
> separated by spaces. I was looking at using ValueSourceQuery but didn't
> really understand how I should really deal
> with the FieldScoreQuery since the field I need to look up on isn't one of
> the defined types. Is there a simpler way I
> should be going about this?
>
> I'm using lucene 2.2.0.
>
> Thanks for your help as always,
> M
>
>
>

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