You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "Beihao-Zhou (via GitHub)" <gi...@apache.org> on 2024/08/08 05:10:58 UTC
[PR] feat(search): add support for Hnsw Vector Search command [kvrocks]
Beihao-Zhou opened a new pull request, #2477:
URL: https://github.com/apache/kvrocks/pull/2477
This PR is part of #2426
## Summary
- Add support of `ft.create` for Hnsw index
- Add go test cases for vector search
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(search): add support of HNSW vector fields for FT.CREATE [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice merged PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(search): add support of HNSW vector fields for FT.CREATE [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477#discussion_r1709169601
##########
tests/gocase/unit/search/search_test.go:
##########
@@ -88,12 +104,30 @@ func TestSearch(t *testing.T) {
fields := res.Val().([]interface{})[2].([]interface{})
if fields[0] == "a" {
require.Equal(t, "x,z", fields[1])
- require.Equal(t, "b", fields[2])
- require.Equal(t, "22", fields[3])
+ if fields[2] == "c" {
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[3])
+ require.Equal(t, "b", fields[4])
+ require.Equal(t, "22", fields[5])
+ } else if fields[2] == "b" {
+ require.Equal(t, "22", fields[3])
+ require.Equal(t, "c", fields[4])
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[5])
+ } else {
+ require.Fail(t, "not started with c or b")
+ }
Review Comment:
maybe we can read them into a map and then do some checks so that we don't need to care the order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(search): add support of HNSW vector fields for FT.CREATE [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477#discussion_r1709169601
##########
tests/gocase/unit/search/search_test.go:
##########
@@ -88,12 +104,30 @@ func TestSearch(t *testing.T) {
fields := res.Val().([]interface{})[2].([]interface{})
if fields[0] == "a" {
require.Equal(t, "x,z", fields[1])
- require.Equal(t, "b", fields[2])
- require.Equal(t, "22", fields[3])
+ if fields[2] == "c" {
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[3])
+ require.Equal(t, "b", fields[4])
+ require.Equal(t, "22", fields[5])
+ } else if fields[2] == "b" {
+ require.Equal(t, "22", fields[3])
+ require.Equal(t, "c", fields[4])
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[5])
+ } else {
+ require.Fail(t, "not started with c or b")
+ }
Review Comment:
maybe we can read them to a map and then do some check so that we don't need to care the order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(search): add support of HNSW vector fields for FT.CREATE [kvrocks]
Posted by "Beihao-Zhou (via GitHub)" <gi...@apache.org>.
Beihao-Zhou commented on code in PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477#discussion_r1709635065
##########
tests/gocase/unit/search/search_test.go:
##########
@@ -88,12 +104,30 @@ func TestSearch(t *testing.T) {
fields := res.Val().([]interface{})[2].([]interface{})
if fields[0] == "a" {
require.Equal(t, "x,z", fields[1])
- require.Equal(t, "b", fields[2])
- require.Equal(t, "22", fields[3])
+ if fields[2] == "c" {
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[3])
+ require.Equal(t, "b", fields[4])
+ require.Equal(t, "22", fields[5])
+ } else if fields[2] == "b" {
+ require.Equal(t, "22", fields[3])
+ require.Equal(t, "c", fields[4])
+ require.Equal(t, "12.000000, 13.000000, 14.000000", fields[5])
+ } else {
+ require.Fail(t, "not started with c or b")
+ }
Review Comment:
good idea! I've pushed new code change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(search): add support of HNSW vector fields for FT.CREATE [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2477:
URL: https://github.com/apache/kvrocks/pull/2477#issuecomment-2276167223
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2477) **Quality Gate failed**
Failed conditions
 [30.5% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2477&metric=new_coverage&view=list) (required ≥ 50%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2477)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org