lucenepp/0005-Use-maxSize-of-BooleanQuery-as-base-for-the-queue-si.patch
Rex Dieter b9bb718041 3.0.7
2015-04-29 10:36:53 -05:00

26 lines
885 B
Diff

From 229f783749283d1ec2bed4593805f7a8458ab819 Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <uwelk@xhochy.com>
Date: Mon, 6 Apr 2015 16:48:16 +0200
Subject: [PATCH 5/6] Use maxSize of BooleanQuery as base for the queue size
---
src/core/search/FuzzyQuery.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/search/FuzzyQuery.cpp b/src/core/search/FuzzyQuery.cpp
index 5291995..38e1bf2 100644
--- a/src/core/search/FuzzyQuery.cpp
+++ b/src/core/search/FuzzyQuery.cpp
@@ -83,7 +83,7 @@ QueryPtr FuzzyQuery::rewrite(const IndexReaderPtr& reader) {
}
int32_t maxSize = BooleanQuery::getMaxClauseCount();
- ScoreTermQueuePtr stQueue(newLucene<ScoreTermQueue>(1024));
+ ScoreTermQueuePtr stQueue(newLucene<ScoreTermQueue>(maxSize + 1));
FilteredTermEnumPtr enumerator(getEnum(reader));
LuceneException finally;
try {
--
2.3.6