2021-02-03 20:13:17 +01:00
|
|
|
package it.cavallium.dbengine.client;
|
2021-01-30 22:09:04 +01:00
|
|
|
|
|
|
|
import it.cavallium.dbengine.database.LLDocument;
|
|
|
|
import it.cavallium.dbengine.database.LLTerm;
|
|
|
|
import java.util.Set;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import reactor.core.publisher.Flux;
|
|
|
|
import reactor.core.publisher.Mono;
|
|
|
|
import reactor.util.function.Tuple2;
|
|
|
|
|
|
|
|
public abstract class Indicizer<T, U> {
|
|
|
|
|
|
|
|
public abstract @NotNull Mono<LLDocument> toDocument(@NotNull T key, @NotNull U value);
|
|
|
|
|
|
|
|
public abstract @NotNull LLTerm toIndex(@NotNull T key);
|
|
|
|
|
|
|
|
public abstract @NotNull String getKeyFieldName();
|
|
|
|
|
|
|
|
public abstract @NotNull T getKey(String key);
|
|
|
|
|
2021-02-06 15:53:10 +01:00
|
|
|
public Flux<Tuple2<String, Set<String>>> getMoreLikeThisDocumentFields(T key, U value) {
|
2021-01-30 22:09:04 +01:00
|
|
|
return Flux.empty();
|
|
|
|
}
|
|
|
|
}
|