From d4c977047c44283e39a36388e79a150b5668fee4 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Thu, 23 Sep 2021 14:50:15 +0200 Subject: [PATCH] Allow sorted/scored counting --- .../searcher/SimpleUnsortedUnscoredLuceneMultiSearcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/cavallium/dbengine/lucene/searcher/SimpleUnsortedUnscoredLuceneMultiSearcher.java b/src/main/java/it/cavallium/dbengine/lucene/searcher/SimpleUnsortedUnscoredLuceneMultiSearcher.java index a1c7503..fd88002 100644 --- a/src/main/java/it/cavallium/dbengine/lucene/searcher/SimpleUnsortedUnscoredLuceneMultiSearcher.java +++ b/src/main/java/it/cavallium/dbengine/lucene/searcher/SimpleUnsortedUnscoredLuceneMultiSearcher.java @@ -27,11 +27,11 @@ public class SimpleUnsortedUnscoredLuceneMultiSearcher implements LuceneMultiSea var indexSearchersResource = Mono .fromRunnable(() -> { LLUtils.ensureBlocking(); - if (queryParams.isSorted()) { + if (queryParams.isSorted() && queryParams.limit() > 0) { throw new UnsupportedOperationException("Sorted queries are not supported" + " by SimpleUnsortedUnscoredLuceneMultiSearcher"); } - if (queryParams.isScored()) { + if (queryParams.isScored() && queryParams.limit() > 0) { throw new UnsupportedOperationException("Scored queries are not supported" + " by SimpleUnsortedUnscoredLuceneMultiSearcher"); }