[skip ci]Format markdown doc for knowhere_design.md (#10001)

Signed-off-by: ruiyi.jiang <ruiyi.jiang@zilliz.com>
pull/10042/head
ryjiang 2021-10-16 22:24:54 +08:00 committed by GitHub
parent 4ab784921a
commit 51dcbd4bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -1,19 +1,23 @@
# What's Knowhere
## Concepts
Vector index is a time-efficient and space-efficient data structure built on vectors through a certain mathematical model. Through the vector index, we can efficiently query several vectors similar to the target vector.
Since accurate retrieval is usually very time-consuming, most of the vector index types of Milvus use ANNS (Approximate Nearest Neighbors Search). Compared with accurate retrieval, the core idea of ANNS is no longer limited to returning the most accurate result, but only searching for neighbors of the target. ANNS improves retrieval efficiency by sacrificing accuracy within an acceptable range.
## What can knowhere do
Knowhere is the vector search execution engine of Milvus. It encapsulates many popular vector index algorithm libraries, such as faiss, hnswlib, NGT, annoy, and provides a set of unified interfaces. In addition, Knowhere also supports heterogeneous computing.
## Framework
![Knowhere framework](graphs/knowhere_framework.png)
For more index types and heterogeneous support, please refer to the vector index document.
## Major Interface
``` C++
```C++
/*
* Serialize
* @return: serialization data
@ -71,13 +75,16 @@ Size();
```
## Data Format
The vector data used for index and query is stored as a one-dimensional array.
And the first `dim * sizeof(data_type)` bytes of the array is the first vector; then `row_num -1` vectors followed.
## Sequence
### Create index
![create index sequence](graphs/create_index.png)
### Query
![knn query sequence](graphs/knn_query.png)