search
Function
Retrieves documents in a database that are similar to the passed document.
Prototype
def search(embeddings, k, filter_dict)
Parameters
Parameter |
Data Type |
Required/Optional |
Description |
|---|---|---|---|
embeddings |
List[List[float]] |
Required |
Vector embeddings. The number of vectors falls within the range of [1, 1024 × 1024). |
k |
Integer |
Optional |
Number of returned similar vectors. The value is greater than 0. The default value is 3. The value range is (0, 10000]. |
filter_dict |
Dict |
Optional |
Reserved. MindFAISS does not support filtered retrieval. |
Return Value
Data Type |
Description |
|---|---|
Tuple[List[List[float]], List[List[int]]] |
Two pieces of data are returned. The first piece of data indicates the score list of the similar vectors, and the second one indicates the ID list of the similar vectors. |
Parent topic: MindFAISS