SearchParams
The types on this page implemented the method signatures of the entity.SearchParam interface.
IndexAUTOINDEXSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with AUTOINDEX.
You can use the entity.NewIndexAUTOINDEXSearchParam()
method to instantiate this type as follows.
searchParams := entity.NewIndexAUTOINDEXSearchParam(level int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| The precision level of the search. Increasing the |
IndexBinFlatSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with BIN_FLAT.
You can use the entity.NewIndexBinFlatSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexBinFlatSearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of units to query |
|
IndexDISKANNSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with DiskANN.
You can use the entity.NewIndexDISKANNSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexDISKANNSearchParam(search_list int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| Size of the candidate list, a larger size offers a higher recall rate with degraded performance. |
IndexFlatSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with FLAT.
You can use the entity.NewIndexFlatSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexFlatSearchParam()
IndexGPUBruteForceSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with GPU_BRUTE_FORCE.
You can use the entity.NewIndexGPUBruteForceSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexGPUBruteForceSearchParam()
IndexGPUCagraSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with GPU_CAGRA.
You can use the entity.NewIndexGPUCagraSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexGPUCagraSearchParam(
itopkSize int,
searchWidth int,
minIterations int,
maxIterations int,
teamSize int,
)
Parameter | Type | Description | Default |
---|---|---|---|
|
| Determines the size of intermediate results kept during the search. A larger value may improve recall at the expense of search performance. It should be at least equal to the final top-k (limit) value and is typically a power of 2 (e.g., 16, 32, 64, 128). | N/A |
|
| Specifies the number of entry points into the CAGRA graph during the search. Increasing this value can enhance recall but may impact search performance(e.g. 1, 2, 4, 8, 16, 32). | N/A |
|
| Controls the search iteration process. By default, they are set to |
|
|
| ||
|
| Specifies the number of CUDA threads used for calculating metric distance on the GPU. Common values are a power of 2 up to 32 (e.g. 2, 4, 8, 16, 32). It has a minor impact on search performance. The default value is |
|
IndexGPUIvfFlatSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with GPU_IVF_FLAT.
You can use the entity.NewIndexGPUIvfFlatSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexGPUIvfFlatSearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of cluster units |
|
IndexGPUIvfPQSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with GPU_IVF_PQ.
You can use the entity.NewIndexGPUIvfPQSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexGPUIvfPQSearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of cluster units |
|
IndexHNSWSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with HNSW.
You can use the entity.NewIndexHNSWSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexHNSWSearchParam(ef int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| Parameter controlling query time/accuracy trade-off. Higher |
IndexIvfFlatSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with IVF_FLAT.
You can use the entity.NewIndexIvfFlatSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexIvfFlatSearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of units to query |
|
IndexIvfPQSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with IVF_PQ.
You can use the entity.NewIndexIvfPQSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexIvfPQSearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of units to query |
|
IndexIvfSQ8SearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with IVF_SQ8.
You can use the entity.NewIndexIvfSQ8SearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexIvfSQ8SearchParam(nprobe int)
Parameter | Type | Value Range | Description | Default |
---|---|---|---|---|
|
|
| Number of units to query |
|
IndexSCANNSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with SCANN.
You can use the entity.NewIndexSCANNSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexSCANNSearchParam(nprobe int, reorder_k int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| Number of units to query |
|
|
| Number of candidate units to query |
IndexSparseInvertedSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with SPARSE_INVERTED_INDEX.
You can use the entity.NewIndexSparseInvertedSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexSparseInvertedSearchParam(dropRatio int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| The proportion of small vector values that are excluded during the search process. This option allows fine-tuning of the search process by specifying the ratio of the smallest values in the query vector to ignore. It helps balance search precision and performance. The smaller the value set for |
IndexSparseWANDSearchParam
This struct type defines the search parameters of a similarity search within a collection indexed with SPARSE_WAND.
You can use the entity.NewIndexSparseWANDSearchParam()
method to instantiate this type as follows:
searchParams := entity.NewIndexSparseWANDSearchParam(dropRatio int)
Parameter | Type | Value Range | Description |
---|---|---|---|
|
|
| The proportion of small vector values that are excluded during the search process. This option allows fine-tuning of the search process by specifying the ratio of the smallest values in the query vector to ignore. It helps balance search precision and performance. The smaller the value set for |