lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim...@apache.org
Subject lucene-solr:branch_7x: LUCENE-8558: Replace O(n) lookup with O(1) lookup in PerFieldMergeState#FilterFieldInfos
Date Wed, 07 Nov 2018 19:34:52 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x b650e9890 -> 684c05ca8


LUCENE-8558: Replace O(n) lookup with O(1) lookup in PerFieldMergeState#FilterFieldInfos


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/684c05ca
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/684c05ca
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/684c05ca

Branch: refs/heads/branch_7x
Commit: 684c05ca8c1971373a96b75e15c0dc547060c4fe
Parents: b650e98
Author: Simon Willnauer <simonw@apache.org>
Authored: Wed Nov 7 20:20:42 2018 +0100
Committer: Simon Willnauer <simonw@apache.org>
Committed: Wed Nov 7 20:34:42 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/684c05ca/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java
b/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java
index 291a384..99a04da 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldMergeState.java
@@ -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;


Mime
View raw message