This commit is contained in:
Andrea Cavalli 2021-02-22 01:54:25 +01:00
parent 575bde94f0
commit af47584803
2 changed files with 5 additions and 5 deletions

View File

@ -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())
)

View File

@ -81,7 +81,7 @@ public class LuceneIndex<T, U> implements LLSnapshottable {
private SearchResultKeys<T> transformLuceneResult(LLSearchResult llSearchResult,
@Nullable MultiSort<SearchResultKey<T>> 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<T, U> implements LLSnapshottable {
public Mono<SearchResultKeys<T>> moreLikeThis(@Nullable CompositeSnapshot snapshot,
T key,
U mltDocumentValue,
int limit,
long limit,
@Nullable Float minCompetitiveScore) {
Flux<Tuple2<String, Set<String>>> mltDocumentFields
= indicizer.getMoreLikeThisDocumentFields(key, mltDocumentValue);
@ -141,7 +141,7 @@ public class LuceneIndex<T, U> implements LLSnapshottable {
public Mono<SearchResult<T, U>> moreLikeThisWithValues(@Nullable CompositeSnapshot snapshot,
T key,
U mltDocumentValue,
int limit,
long limit,
@Nullable Float minCompetitiveScore,
ValueGetter<T, U> valueGetter) {
Flux<Tuple2<String, Set<String>>> mltDocumentFields
@ -162,7 +162,7 @@ public class LuceneIndex<T, U> implements LLSnapshottable {
*/
public Mono<SearchResultKeys<T>> search(@Nullable CompositeSnapshot snapshot,
Query query,
int limit,
long limit,
@Nullable MultiSort<SearchResultKey<T>> sort,
LLScoreMode scoreMode,
@Nullable Float minCompetitiveScore) {