rmuir commented on PR #11987: URL: https://github.com/apache/lucene/pull/11987#issuecomment-1337607709
sorry, we definitely should not be adding arrays to bytesref here. Like i said, we can just remove the threadlocal. The issue to me has nothing to do with buffers. it has to do with allowing codec to maintain state across multiple calls to `IndexReader.document`. And due to the api being `IndexReader.document(int)`, the only way it can do that is via threadlocal. That's what i aim to fix. In the case of this codec, some of that state happens to be a buffer which annoys you. But that isn't the only possible state which is possible (e.g. file pointer locations etc). Basically the `IndexReader.document(int)` api is out-of-date, since practically stored fields codecs don't just fetch individual documents in isolation anymore, they do things such as compress them in blocks. -- 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