From bf071222ed161410722b79f8cdf623c53ea3daf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Laleve=CC=81e?= Date: Tue, 19 Jul 2011 12:20:36 +0200 Subject: [PATCH] fix the maxExpansion of a prefix query --- .../common/lucene/search/MultiPhrasePrefixQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQuery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQuery.java index 97bd9730a9e..fed5b8e6b21 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQuery.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQuery.java @@ -162,7 +162,7 @@ public class MultiPhrasePrefixQuery extends Query { } else { break; } - if (terms.size() > maxExpansions) { + if (terms.size() >= maxExpansions) { break; } } while (enumerator.next());