JarvisCraft commented on PR #12343: URL: https://github.com/apache/lucene/pull/12343#issuecomment-1572190112
> I think look at how QueryBuilder does this: > > ``` > new Term(field, termAtt.getBytesRef()) > ``` > > I don't see any benefit of adding yet another way to do it. Not all methods seem to have this conversion, for example `CharTermAttribute` has none. Also note, that your example performs a defensice copy in constructor of the `Term` unlike the constructor which takes a `String` and only once creates a `BytesRef`. I guess it was the whole purpose of the existing `String`-accepting constructor which was just looked through and should have initially accepted `CharSequence`. -- 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]
