magibney commented on a change in pull request #158:
URL: https://github.com/apache/solr/pull/158#discussion_r644814658
##########
File path: solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
##########
@@ -1149,7 +1150,7 @@ protected Query getFieldQuery(String field, List<String>
queryTerms, boolean raw
return newFieldQuery
(getAnalyzer(), field, queryText, false,
fieldAutoGenPhraseQueries, fieldEnableGraphQueries, synonymQueryStyle);
} else {
- if (raw) {
+ if (raw) {// assumption: raw = false only when called from
ExtendedDismaxQueryParser.getQuery()
Review comment:
Yeah, either way's fine. I meant that we're "swallowing" the exception
in the sense that we're not _rethrowing_ it, which lenient approach is
warranted (iiuc) by the assumption that this code is only called from from the
lenient edismax parser. I guess my thought was: if I'm a developer looking at
the exception get caught and not rethrown, I'm likely to wonder "why be lenient
and not rethrow? -- ah! because of this commented assumption!". By contrast, if
I'm a developer looking at the {{if (raw) {}} line, I'll see the comment and
wonder "why do I care about where I'm being called from at this point?".
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]