From af47584803342dcf29654c83b4041e1d07f42bfb Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Mon, 22 Feb 2021 01:54:25 +0100 Subject: [PATCH] Bugfixes --- .../it.cavallium.dbengine.client/IndicizationExample.java | 2 +- .../java/it/cavallium/dbengine/client/LuceneIndex.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/example/java/it.cavallium.dbengine.client/IndicizationExample.java b/src/example/java/it.cavallium.dbengine.client/IndicizationExample.java index 27c89f2..1104a4e 100644 --- a/src/example/java/it.cavallium.dbengine.client/IndicizationExample.java +++ b/src/example/java/it.cavallium.dbengine.client/IndicizationExample.java @@ -109,7 +109,7 @@ public class IndicizationExample { .then(index.search(null, Query.exactSearch(TextFieldsAnalyzer.N4GramPartialString,"name", "Mario"), 10, MultiSort.topScore() .getQuerySort(), LLScoreMode.COMPLETE, null, "id")) .flatMap(results -> LuceneUtils.mergeStream(results - .results(), MultiSort.topScoreRaw(), 10) + .results(), MultiSort.topScoreRaw(), 10L) .doOnNext(value -> System.out.println("Value: " + value)) .then(results.totalHitsCount()) ) diff --git a/src/main/java/it/cavallium/dbengine/client/LuceneIndex.java b/src/main/java/it/cavallium/dbengine/client/LuceneIndex.java index 41bc608..0286b97 100644 --- a/src/main/java/it/cavallium/dbengine/client/LuceneIndex.java +++ b/src/main/java/it/cavallium/dbengine/client/LuceneIndex.java @@ -81,7 +81,7 @@ public class LuceneIndex implements LLSnapshottable { private SearchResultKeys transformLuceneResult(LLSearchResult llSearchResult, @Nullable MultiSort> sort, LLScoreMode scoreMode, - @Nullable Integer limit) { + @Nullable Long limit) { var mappedKeys = llSearchResult .results() .map(flux -> flux.map(item -> new SearchResultKey<>(indicizer.getKey(item.getKey()), item.getScore()))); @@ -120,7 +120,7 @@ public class LuceneIndex implements LLSnapshottable { public Mono> moreLikeThis(@Nullable CompositeSnapshot snapshot, T key, U mltDocumentValue, - int limit, + long limit, @Nullable Float minCompetitiveScore) { Flux>> mltDocumentFields = indicizer.getMoreLikeThisDocumentFields(key, mltDocumentValue); @@ -141,7 +141,7 @@ public class LuceneIndex implements LLSnapshottable { public Mono> moreLikeThisWithValues(@Nullable CompositeSnapshot snapshot, T key, U mltDocumentValue, - int limit, + long limit, @Nullable Float minCompetitiveScore, ValueGetter valueGetter) { Flux>> mltDocumentFields @@ -162,7 +162,7 @@ public class LuceneIndex implements LLSnapshottable { */ public Mono> search(@Nullable CompositeSnapshot snapshot, Query query, - int limit, + long limit, @Nullable MultiSort> sort, LLScoreMode scoreMode, @Nullable Float minCompetitiveScore) {