On 7/20/2021 11:37 PM, Satya Nand wrote:
We have a filter query in our system "fq=negativeattribute:(citychennai%20citydelhi)", in solr 6.5 it was working fine. solr 6.5 parsed query as <arr name="parsed_filter_queries"> <str>negativeattribute:citychennai negativeattribute:citydelhi</str> </arr> After upgrading the solr to 8.7, this query broke. It is not working as before solr 8.7 parsed query as "parsed_filter_queries": [ "negativeattribute:citychennai citydelhi", } Schema of negattribute field

The "sow" query parameter (split on whitespace) now defaults to false.  This is intentional.  Your analysis chain doesn't split the input into tokens, so the value is accepted as-is -- with the space.

It is expected that the query analysis definition will do the splitting now, not the query parser.

You can add "sow=true" to the query parameters, either on the request or in the handler definition, and regain the behavior you're expecting.  But if you actually do intend to have this field be an exact match of all characters including space, that's probably not the best idea.  If you change the fq to the following, it would also work:

fq=negativeattribute:(citychennai OR citydelhi)

Thanks,
Shawn

Reply via email to