apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.46k stars 979 forks source link

Use IOContext#RANDOM when appropriate. #13267

Closed jpountz closed 2 months ago

jpountz commented 2 months ago

This switches the following files to IOContext#RANDOM:

I hesitated using IOContext.RANDOM on terms, since they have a random access pattern when running term queries, but a more sequential access pattern when running multi-term queries. I erred on the conservative side and did not switch them to IOContext.RANDOM for now.

For simplicity, I'm only touching the current codec, not previous codecs.