CavalliumDBEngine/src/main/java/it/cavallium/dbengine/client/Indicizer.java

25 lines
719 B
Java
Raw Normal View History

2021-02-03 20:13:17 +01:00
package it.cavallium.dbengine.client;
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) {
return Flux.empty();
}
}