I'm looking at upgrading the version of Solr used with our application from 5.3 to 6.5.
Having an issue with a change in the behavior of one of the filter queries we generate. The field "ctindex" is only present in a subset of documents. It basically contains a user id. For those documents where it is present, I only want documents returned where the ctindex value matches the id of the user performing the search. Documents with no ctindex value should be returned as well. This is implemented through a filter query that excludes documents that contain some other value in the ctindex field: fq=(-ctindex:({* TO "MyId"} OR {"MyId" TO *})) In 6.5 if q.op=AND I always get 0 results returned when the fq is used. This wasn't the case in 5.3. If I remove the q.op parameter (or set it to OR) I get the expected results. I can reproduce this in the Solr Admin UI. If I enable debugQuery, the parsed_filter_queries output is different with q.op=AND and with no q.op parameter: For q.op=AND I see: ["+(-(SolrRangeQuery(ctindex:{* TO MyId}) SolrRangeQuery(ctindex:{MyId TO *})))"] With no q.op set I get: ["-(SolrRangeQuery(ctindex:{* TO MyId}) SolrRangeQuery(ctindex:{MyId TO *}))"] In 5.3 I always get the same parsed_filter_queries output regardless of the q.op setting: ["-(ctindex:{* TO MyId} ctindex:{MyId TO *})"] Any idea what is going on, or how to make the behavior of this filter query independent of the q.op setting? More details: - Using the standard query parser - The fieldType of the ctindex field is "string" - I upgraded to 6.5 by copying my 5.3 config files over, updating the schema version to 1.6 in the schema.xml, updating the luceneMatchVersion to 6.5.0 in the solrconfig.xml, and building a brand new index. Thanks, - Andy -