2021-01-29 17:19:01 +01:00
|
|
|
package it.cavallium.dbengine.database;
|
|
|
|
|
|
|
|
import java.util.function.BiFunction;
|
2021-03-27 03:35:27 +01:00
|
|
|
import lombok.Value;
|
2021-01-29 17:19:01 +01:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import reactor.core.publisher.Flux;
|
|
|
|
|
2021-03-27 03:35:27 +01:00
|
|
|
@Value
|
2021-01-29 17:19:01 +01:00
|
|
|
public class LLSearchResult {
|
|
|
|
|
2021-03-27 03:35:27 +01:00
|
|
|
Flux<LLSearchResultShard> results;
|
2021-01-29 17:19:01 +01:00
|
|
|
|
|
|
|
@NotNull
|
|
|
|
public static BiFunction<LLSearchResult, LLSearchResult, LLSearchResult> accumulator() {
|
2021-03-03 15:03:25 +01:00
|
|
|
return (a, b) -> new LLSearchResult(Flux.merge(a.results, b.results));
|
2021-01-29 17:19:01 +01:00
|
|
|
}
|
|
|
|
}
|