Package org.zvec.binding
Class IvfRabitqQueryParams
java.lang.Object
org.zvec.binding.IvfRabitqQueryParams
- All Implemented Interfaces:
AutoCloseable
High-level wrapper for
zvec_ivf_rabitq_query_params_t (IVF RaBitQ
search parameters, available since zvec v0.7.0).
Ownership: passing an instance to
VectorQuery.setIvfRabitqParams(IvfRabitqQueryParams) or
GroupByVectorQuery.setIvfRabitqParams(IvfRabitqQueryParams)
transfers ownership to the query (mirroring the C API), and the wrapper
becomes inert; close() afterwards is a no-op.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate IVF RaBitQ query parameters with defaults (nprobe=10).IvfRabitqQueryParams(int nprobe, float radius, boolean isLinear, boolean isUsingRefiner) Create IVF RaBitQ query parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddestroy()booleanbooleanintfloatfloatGet the candidate expansion factor used by the refiner.voidsetIsLinear(boolean isLinear) voidsetIsUsingRefiner(boolean isUsingRefiner) voidsetNprobe(int nprobe) voidsetRadius(float radius) voidsetScaleFactor(float scaleFactor) Set the candidate expansion factor used by the refiner.
-
Constructor Details
-
IvfRabitqQueryParams
public IvfRabitqQueryParams()Create IVF RaBitQ query parameters with defaults (nprobe=10). -
IvfRabitqQueryParams
public IvfRabitqQueryParams(int nprobe, float radius, boolean isLinear, boolean isUsingRefiner) Create IVF RaBitQ query parameters.- Parameters:
nprobe- number of clusters to proberadius- search radius (0 disables radius filtering)isLinear- whether to use linear searchisUsingRefiner- whether to use the refiner
-
-
Method Details
-
setNprobe
public void setNprobe(int nprobe) -
getNprobe
public int getNprobe() -
setScaleFactor
public void setScaleFactor(float scaleFactor) Set the candidate expansion factor used by the refiner. -
getScaleFactor
public float getScaleFactor()Get the candidate expansion factor used by the refiner. -
setRadius
public void setRadius(float radius) -
getRadius
public float getRadius() -
setIsLinear
public void setIsLinear(boolean isLinear) -
getIsLinear
public boolean getIsLinear() -
setIsUsingRefiner
public void setIsUsingRefiner(boolean isUsingRefiner) -
getIsUsingRefiner
public boolean getIsUsingRefiner() -
destroy
public void destroy() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-