lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [20/50] [abbrv] lucene-solr:jira/http2: LUCENE-8558: Replace O(n) lookup with O(1) lookup in PerFieldMergeState#FilterFieldInfos
Date Mon, 12 Nov 2018 11:55:29 GMT
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/ff1df8a1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ff1df8a1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ff1df8a1

Branch: refs/heads/jira/http2
Commit: ff1df8a15c6eaed81ad7c033014a173175383e5d
Parents: f2cb936
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:05 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/ff1df8a1/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