mirror of https://github.com/apache/lucene.git
LUCENE-8558: Replace O(n) lookup with O(1) lookup in PerFieldMergeState#FilterFieldInfos
This commit is contained in:
parent
f2cb93605c
commit
ff1df8a15c
|
@ -125,7 +125,7 @@ final class PerFieldMergeState {
|
|||
this.filteredNames = new HashSet<>(filterFields);
|
||||
this.filtered = new ArrayList<>(filterFields.size());
|
||||
for (FieldInfo fi : src) {
|
||||
if (filterFields.contains(fi.name)) {
|
||||
if (this.filteredNames.contains(fi.name)) {
|
||||
this.filtered.add(fi);
|
||||
hasVectors |= fi.hasVectors();
|
||||
hasProx |= fi.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;
|
||||
|
|
Loading…
Reference in New Issue