apache / lucene

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

Move per-field vector and doc-values readers from TreeMap to HashMap. #13284

Closed jpountz closed 2 months ago

jpountz commented 2 months ago

Our per-field vector and doc-values readers use TreeMaps but don't rely on the iteration order, so these TreeMaps can be replaced with more CPU/RAM-efficient HashMaps.

The per-field postings reader stays on a TreeMap since it relies on the iteration order.