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 <[EMAIL PROTECTED]> 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
>
>
>

Reply via email to