You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Johannes Schlumberger <jo...@appfolio.com> on 2014/05/14 19:12:59 UTC

FilteredQuery with TermsFilter swallowing results after upgrade to solr 4.8

Hi,
I am in the process of upgrading an extension I made to QueryComponent from
solr 3.4 to solr 4.8.
I am wrapping the query into a filteredquery together with a termsfilter
that encapsulates a lot of Terms for up to two fields (potentially 10s of
thousands, only two in my simple test case).
My extension worked fine in solr 34 and I have used it for years. After
upgrading to solr 4.8 and compiling the extension against the new source
(Termsfilter API changed a little bit in how you pass in the terms), I am
no longer getting any records back when running a query.
The same query not involving the filter returns the expected results. A
semantically equivalent query using a lot of OR clauses in the fq query
parameter works fine, but is about 10 times slower, so I would really like
to get the TermsFilter to work.
I printed out the Query in solr 34 and in solr 48 and they differ
(Unfortunately I do not know how to read these lines.):
solr 34: filtered(+(bedbathbeyond:portlandia | title_pst:portlandia^1.5 |
license_plate:portlandia | title_tst:portlandia^2.0 |
description_pst:portlandia^0.8 | description_tst:portlandia |
phone_number:portlandia |
reference_number:portlandia))->org.apache.lucene.search.TermsFilter@66c21442

solr 48: filtered(+(+(reference_number:portlandia |
title_tst:portlandia^2.0 | license_plate:portlandia |
phone_number:portlandia | bedbathbeyond:portlandia |
title_pst:portlandia^1.5 | description_tst:portlandia |
description_pst:portlandia^0.8)))->property_group_id:984678480
property_id:984678954

(The query info for the latter line was: INFO: [property_test] webapp=/solr
path=/select
params={fl=*+score&start=0&q=portlandia&qf=title_pst^1.5+title_tst^2+description_pst^0.8+description_tst+bedbathbeyond+phone_number+reference_number+license_plate&properties=984678954&wt=ruby&groups=984678480&fq=type:Property&fq=visibility_s:visible&rows=25&defType=edismax}
hits=0 status=0 QTime=5 )

I attached a copy of my source code, and marked the changes I made to the
code of QueryComponent with comments - maybe there is something obviously
wrong.
Any help or pointers are appreciated, also please let me know if I should
rather write to the dev list than the users list.
thanks,
        Johannes