Code cleanup
This commit is contained in:
parent
2a9427f0e4
commit
96d19c3e09
@ -757,6 +757,9 @@ public class LuceneUtils {
|
||||
return QueryParams.of(query, 0, 0, NoSort.of(), false, Long.MAX_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite a lucene query of a local searcher, then call the local searcher again with the rewritten query
|
||||
*/
|
||||
public static Mono<LuceneSearchResult> rewrite(LocalSearcher localSearcher,
|
||||
Mono<LLIndexSearcher> indexSearcherMono,
|
||||
LocalQueryParams queryParams,
|
||||
@ -773,6 +776,9 @@ public class LuceneUtils {
|
||||
}, LLUtils::finalizeResource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite a lucene query of a multi searcher, then call the multi searcher again with the rewritten query
|
||||
*/
|
||||
public static Mono<LuceneSearchResult> rewriteMulti(MultiSearcher multiSearcher,
|
||||
Mono<LLIndexSearchers> indexSearchersMono,
|
||||
LocalQueryParams queryParams,
|
||||
|
@ -66,17 +66,6 @@ public class CountMultiSearcher implements MultiSearcher {
|
||||
.doOnDiscard(LuceneSearchResult.class, SimpleResource::close), LLUtils::finalizeResource);
|
||||
}
|
||||
|
||||
private LocalQueryParams getLocalQueryParams(LocalQueryParams queryParams) {
|
||||
return new LocalQueryParams(queryParams.query(),
|
||||
0L,
|
||||
queryParams.offsetLong() + queryParams.limitLong(),
|
||||
queryParams.pageLimits(),
|
||||
queryParams.sort(),
|
||||
queryParams.computePreciseHitsCount(),
|
||||
queryParams.timeout()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<LuceneSearchResult> collect(Mono<LLIndexSearcher> indexSearcherMono,
|
||||
LocalQueryParams queryParams,
|
||||
|
Loading…
x
Reference in New Issue
Block a user