K - Key type@Experimental public abstract class Combiner<K> extends Object
Combiners.
Combiners define how text search scores and vector similarity scores are combined into a final ranking score using RRF (Reciprocal Rank Fusion) or LINEAR strategies.
// RRF with default parameters
Combiners.rrf()
// RRF with custom window and constant
Combiners.rrf().window(10).constant(60)
// Linear combination with weights
Combiners.linear().alpha(0.7).beta(0.3)
// With score alias
Combiners.rrf().as("combined_score")
| Modifier | Constructor and Description |
|---|---|
protected |
Combiner(String name)
Creates a new combiner with the specified name.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Combiner<K>> |
as(K alias)
Set an alias for the combined score field using YIELD_SCORE_AS.
|
<V> void |
build(CommandArgs<K,V> args)
Build the combiner arguments into the command.
|
String |
getName()
Get the combiner name.
|
protected abstract List<Object> |
getOwnArgs()
Get the combiner-specific arguments.
|
protected Combiner(String name)
name - the combiner name (e.g., "RRF", "LINEAR")public final String getName()
public final <T extends Combiner<K>> T as(K alias)
alias - the field name to use for the combined scoreprotected abstract List<Object> getOwnArgs()
public final <V> void build(CommandArgs<K,V> args)
V - value typeargs - the CommandArgs to append toCopyright © 2026 lettuce.io. All rights reserved.