lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: questions on PerFieldSimilarityWrapper
Date Fri, 09 Nov 2012 11:08:53 GMT
Feels a bit of a hack, but you might be able to make it work by
storing the field name when MyPerFieldxxx.get(name) is called and
using that in MyPerFieldxxx.queryNorm() and coord() calls to do the
right thing, either inline or via the relevant Similarity subclass,
identified by the name.


On Thu, Nov 8, 2012 at 5:46 PM, Joel Barry <> wrote:
>> coord() and queryNorm() work on the query as a whole, which may span
>> multiple fields.
> Thanks for the response, but I'm still confused.  In our use case, our
> documents have two distinct types of fields, e.g.
> Document:
>   A-field1
>   A-field2
>   A-field3
>   B-field1
>   B-field2
>   B-field3
> In our application, we know that queries will hit only A-fields or
> B-fields, never both in the same query.  But we *do* want to have
> different behavior for queryNorm() and coord() for the A and B
> queries.
> Could you suggest a way to do this?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message