stefanvodita commented on issue #11681:
URL: https://github.com/apache/lucene/issues/11681#issuecomment-1637120493

   Thank you for the thorough description! I was curious about this issue and 
went through the code. The class Javadoc implies that this behaviour is 
intentional:
   
   > Analyzes the input text and then suggests matches based on prefix matches 
to **_any_** tokens in the indexed text
   
   I wonder if this is because there's a use-case for matching on the same 
occurence of `pen` multiple times or because of technical limitations. The way 
it works now is that we build a `BooleanQuery` that ANDs term queries for `pen` 
and `p`. I don't know if there's a good way to express the intent of "match the 
prefix `p`, but not on terms that were matched by another query".


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to