public static class HybridArgs.Builder extends Object
HybridArgs.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
HybridArgs |
build()
Build the
HybridArgs instance. |
HybridArgs.Builder |
combine(Combiner combiner)
Configure the COMBINE clause using a
Combiner. |
HybridArgs.Builder |
param(String name,
byte[] value)
Add a binary query parameter, for example the query vector of a KNN clause (
*=>[KNN 10 @embedding $vec]). |
HybridArgs.Builder |
param(String name,
String value)
Add a query parameter.
|
HybridArgs.Builder |
postProcessing(PostProcessingArgs postProcessingArgs)
Set the post-processing arguments.
|
HybridArgs.Builder |
search(HybridSearchArgs searchArgs)
Configure the SEARCH clause using
HybridSearchArgs. |
HybridArgs.Builder |
timeout(Duration timeout)
Set the maximum time to wait for the query to complete.
|
HybridArgs.Builder |
vectorSearch(HybridVectorArgs vectorArgs)
Configure the VSIM clause using
HybridVectorArgs. |
public HybridArgs build()
HybridArgs instance.public HybridArgs.Builder search(HybridSearchArgs searchArgs)
HybridSearchArgs.searchArgs - the search argumentspublic HybridArgs.Builder vectorSearch(HybridVectorArgs vectorArgs)
HybridVectorArgs.vectorArgs - the vector search argumentspublic HybridArgs.Builder combine(Combiner combiner)
Combiner.
Use Combiners.rrf() or Combiners.linear() to create combiners.
public HybridArgs.Builder postProcessing(PostProcessingArgs postProcessingArgs)
postProcessingArgs - the post-processing configurationpublic HybridArgs.Builder param(String name, String value)
$name and the server substitutes the value wherever that
reference appears, so values need no escaping and cannot alter the query structure, for example
param("category", "electronics") with the query @category:{$category}. The value is sent as UTF-8
text. Adding a parameter with the same name again replaces its value.
FT.HYBRID always accepts parameters; the query vector of the VSIM clause is passed this way, as
vector("$vec") together with param("vec", blob).
name - the parameter name, referenced as $name in the query, must not be nullvalue - the parameter value, must not be nullpublic HybridArgs.Builder param(String name, byte[] value)
*=>[KNN 10 @embedding $vec]). The
bytes are sent exactly as given, which the String overload cannot do for arbitrary binary data. The query
references the parameter as $name; adding a parameter with the same name again replaces its value.
FT.HYBRID always accepts parameters; the query vector of the VSIM clause is passed this way, as
vector("$vec") together with param("vec", blob).
name - the parameter name, referenced as $name in the query, must not be nullvalue - the binary parameter value, sent as-is, must not be nullpublic HybridArgs.Builder timeout(Duration timeout)
timeout - the timeout duration (with millisecond resolution)Copyright © 2026 lettuce.io. All rights reserved.