Ignore release errors for empty searchers
This commit is contained in:
parent
2207ae4314
commit
6e31aa01f9
@ -30,7 +30,9 @@ public final class SearchResult<T, U> {
|
||||
}
|
||||
|
||||
public static <T, U> SearchResult<T, U> empty() {
|
||||
return new SearchResult<>(Flux.empty(), TotalHitsCount.of(0, true), Mono.empty());
|
||||
var sr = new SearchResult<T, U>(Flux.empty(), TotalHitsCount.of(0, true), Mono.empty());
|
||||
sr.releaseCalled = true;
|
||||
return sr;
|
||||
}
|
||||
|
||||
public Flux<SearchResultItem<T, U>> resultsThenRelease() {
|
||||
|
@ -32,8 +32,10 @@ public final class SearchResultKeys<T> {
|
||||
}).then(release);
|
||||
}
|
||||
|
||||
public static <T, U> SearchResultKeys<T> empty() {
|
||||
return new SearchResultKeys<>(Flux.empty(), TotalHitsCount.of(0, true), Mono.empty());
|
||||
public static <T> SearchResultKeys<T> empty() {
|
||||
var sr = new SearchResultKeys<T>(Flux.empty(), TotalHitsCount.of(0, true), Mono.empty());
|
||||
sr.releaseCalled = true;
|
||||
return sr;
|
||||
}
|
||||
|
||||
public <U> SearchResult<T, U> withValues(ValueGetter<T, U> valuesGetter) {
|
||||
|
Loading…
Reference in New Issue
Block a user