Add utility method to lazyhitentry

This commit is contained in:
Andrea Cavalli 2022-03-29 21:27:56 +02:00
parent 87c031fe71
commit 6bd3fdb677
2 changed files with 5 additions and 0 deletions

View File

@ -8,4 +8,8 @@ public record LazyHitEntry<T, U>(Mono<T> key, Mono<U> value, float score) {
public Mono<HitEntry<T, U>> resolve() {
return Mono.zip(key, value, (k, v) -> new HitEntry<>(k, v, score));
}
public Mono<HitKey<T>> resolveKey() {
return key.map(k -> new HitKey<>(k, score));
}
}

View File

@ -205,6 +205,7 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
.setPartitionFilters(true)
.setIndexType(IndexType.kTwoLevelIndexSearch)
.setFormatVersion(5)
//todo: replace with kxxhash3
.setChecksumType(ChecksumType.kxxHash)
.setBlockCacheCompressed(optionsWithCache.compressedCache())
.setBlockCache(optionsWithCache.standardCache())