epotyom commented on PR #16446:
URL: https://github.com/apache/lucene/pull/16446#issuecomment-5451537837

   I saw your other PR #16442. I think if we call `addClause` instead of 
`addMultiTermClauses` as suggested above, it fixes that one too, and probably 
some other corner cases. For example, with `MultiFieldQueryParser("title", 
"body")`, `EnglishAnalyzer` and `AND`:
   
   ```
   +small hello       ->  +(title:small body:small) +(title:hello body:hello) 
[WORKS AS EXPECTED]
   +small hello the   ->  +(title:small body:small) title:hello body:hello 
[WRONG]
   ```
   
   A stopword next to a term makes that term optional, and neither PR changes 
that. With `addClause` both parse the same, and the five new tests from #16442 
pass unchanged.


-- 
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