From 529303c533892529890a715cb4f265fddaf0a92e Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 26 Oct 2010 11:04:55 +0200 Subject: [PATCH] Query: match_all query (also in query_string: *:*) is very slow --- .../org/elasticsearch/common/lucene/docset/AllDocSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java index cccb1af57d2..52dfde19c0f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java @@ -66,7 +66,7 @@ public class AllDocSet extends DocSet { if (++doc < maxDoc) { return doc; } - return NO_MORE_DOCS; + return doc = NO_MORE_DOCS; } @Override public int advance(int target) throws IOException { @@ -74,7 +74,7 @@ public class AllDocSet extends DocSet { if (doc < maxDoc) { return doc; } - return NO_MORE_DOCS; + return doc = NO_MORE_DOCS; } } }