Package org.zvec.binding
Class MultiQuery
java.lang.Object
org.zvec.binding.MultiQuery
- All Implemented Interfaces:
AutoCloseable
High-level wrapper for
zvec_multi_query_t.
Combines multiple SubQuery instances (e.g., vector + FTS) and
supports re-ranking strategies such as RRF and weighted fusion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubQuery(SubQuery subQuery) Add a sub-query.voidclose()voiddestroy()booleanlongintgetTopk()voidvoidsetIncludeVector(boolean include) voidsetOutputFields(String[] fields) Set the scalar fields to return.voidsetRerankRrf(int rankConstant) Enable reciprocal rank fusion (RRF) re-ranking.voidsetRerankWeighted(double[] weights) Enable weighted fusion re-ranking.voidsetTopk(int topk)
-
Constructor Details
-
MultiQuery
public MultiQuery()
-
-
Method Details
-
addSubQuery
Add a sub-query. The sub-query is copied; caller retains ownership. -
getSubQueryCount
public long getSubQueryCount() -
setTopk
public void setTopk(int topk) -
getTopk
public int getTopk() -
setFilter
-
getFilter
-
setIncludeVector
public void setIncludeVector(boolean include) -
getIncludeVector
public boolean getIncludeVector() -
setOutputFields
Set the scalar fields to return.- Parameters:
fields- field names;nullreturns all fields, an empty array returns only the primary key / system columns
-
setRerankRrf
public void setRerankRrf(int rankConstant) Enable reciprocal rank fusion (RRF) re-ranking. -
setRerankWeighted
public void setRerankWeighted(double[] weights) Enable weighted fusion re-ranking. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
destroy
public void destroy()
-