Re: questions on PerFieldSimilarityWrapper

2012-11-09 Thread James Clarke
I'm still confused by the semantics of PerFieldSimilarityWrapper. How can the queryNorm be independent of the Similarity? (at least in our case it isn't) >From my understanding the current PerFieldSimilarityWrapper implementation limits us to using Similarities that have the same queryNorm impleme

Re: questions on PerFieldSimilarityWrapper

2012-11-09 Thread Ian Lea
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. -- Ian.

Re: questions on PerFieldSimilarityWrapper

2012-11-08 Thread Joel Barry
> 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 ap

Re: questions on PerFieldSimilarityWrapper

2012-11-07 Thread Robert Muir
coord() and queryNorm() work on the query as a whole, which may span multiple fields. On Wed, Nov 7, 2012 at 5:23 PM, Joel Barry wrote: > Hi folks, > > I have a question on PerFieldSimilarityWrapper. It seems that it is > not possible to get per-field behavior on queryNorm() and coord()... > > T

questions on PerFieldSimilarityWrapper

2012-11-07 Thread Joel Barry
Hi folks, I have a question on PerFieldSimilarityWrapper. It seems that it is not possible to get per-field behavior on queryNorm() and coord()... The documentation for PerFieldAnalyzerWrapper (lucene 4.0) says: Subclasses should implement get(String) to return an appropriate Similarity (fo