ispringer commented on code in PR #4652:
URL: https://github.com/apache/solr/pull/4652#discussion_r3721692295


##########
solr/core/src/java/org/apache/solr/search/DisMaxQParser.java:
##########


Review Comment:
   Opus advises against reusing the parsed q / counting BQ clauses for two 
reasons:
   
     1. Clause count ≈ whitespace count. The qf parser has 
setSplitOnWhitespace(true), so BQ clause count is really the number of 
whitespace-separated words, not analyzed terms. That skips the boost for wi-fi, 
CJK, WordDelimiterGraph, multi-word synonyms, etc. — all "one word" but 
multiple analyzed terms that genuinely want the phrase boost.
     2. q is the qf parse, the boost is the pf parse. parsedUserQuery is 
analyzed with the qf fields; the phrase boost is analyzed with the pf fields, 
force-quoted. When pf ≠ qf they can differ in fields/analyzers (and shape, 
since one's free-form and one's a forced phrase), so the qf query's term count 
isn't a reliable proxy.
   
   From me: It seems better to favor correctness for all the corner cases over 
the perf gain from skipping the pp parse. Do you agree?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to