Closed Jant1L closed 2 months ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.
:white_check_mark: Jant1L
:white_check_mark: PPPoint-t
:white_check_mark: lipanpan03
:x: tugraph
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: Jant1L
:x: PPPoint-t
You have signed the CLA already but the status is still pending? Let us recheck it.
test case 在哪里?
test case 在哪里?
submit test case
MATCH (m:Movie {title: 'Godfather, The'})
CALL db.index.vector.queryNodes('moviePlots', 5, m.embedding)
YIELD node AS movie, score
where movie.title = 'xxxxxx'
RETURN movie, score
参考这种写法,向量查出来的点可以继续配合cypher的其他语法来做逻辑处理。 类似这种的查询需要可以跑通,不然用户层面无法使用。
这一版,先暂时合并进去。
Support create vector index and query similarity
How to create a vertex which contains vector property: eg: _CALL db.createVertexLabel('person', 'id', 'id', 'int64', false, 'vector', 'floatvector', true); CREATE (n:person {id:2001, vector: [1.0,2.0,3.0]});
Create vector index: vector.AddVectorIndex(label_name, field_name, index_type, vec_dimension, distance_type ,index_spec); eg:for HNSW, it need 2 parameters for index_spec:Max_degree && ef_construction CALL vector.AddVectorIndex('person', 'vector', 'HNSW', 4, 'L2' ,24 , 100);
Delete vector index: vector.DeleteVectorIndex(label_name, field_name, index_type, vec_dimension, distance_type); eg: CALL vector.DeleteVectorIndex('person', 'vector', ' HNSW ', 4, 'L2');
Show vector index: CALL vector.ShowVectorIndex();
Query by using vector index: CALL vector.VectorIndexQuery(label_name, field_name, vector, vec_dimension, query_spec); eg:for HNSW, it need 1 parameter for index_spec:ef_search CALL vector.VectorIndexQuery('person', 'vector', [1,2,3,4], 4, 10);
What support now: VSAG HNSW
TODO: support more vector index algorithm and library