Hello All,

I have been doing a lot of research in building some custom queries and I have 
been looking at the Lucene Join library as a reference. I noticed something 
that I believe could actually have a negative side effect.

Specifically I was looking at the JoinUtil.createJoinQuery(…) method and within 
that method you see the following code:

        TermsWithScoreCollector termsWithScoreCollector =
            TermsWithScoreCollector.create(fromField, 
multipleValuesPerDocument, scoreMode);
        fromSearcher.search(fromQuery, termsWithScoreCollector);

As you can see, when the JoinQuery is being built, the code is executing the 
query that is wraps with it’s own collector to collect all the scores. If I 
were to write a query parser using this library (which someone has done here), 
doesn’t this reduce the benefit of the SOLR query cache? The wrapped query is 
being executing when the Join Query is being constructed, not when it is 
executed.

Thanks

Darin
 

Reply via email to