rmuir commented on PR #12343:
URL: https://github.com/apache/lucene/pull/12343#issuecomment-1572225302

   sorry, i'm against this PR. I suggest reading the javadocs of the 
TermToBytesRefAttribute and looking at QueryBuilder.
   
   if the terms are binary (non-unicode) then it is senseless and won't work to 
use CharSequence at all. You are also confused about copying: Term always makes 
its own internal BytesRef.
   
   with your ctor it makes its own internal BytesRef, too.
   using termtoattribute as i suggest makes its own internal BytesRef. there's 
no waste as the BytesRef you get from TermToBytesRefAttribute is re-used (look 
at the source code). This is the method used by both lucene's indexers and 
query parsers, so it is really what you should be using to form terms.
   


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