mirror of https://github.com/milvus-io/milvus.git
enhance: Rename SearchV2 to HybridSearch (#29592)
related: https://github.com/milvus-io/milvus-proto/pull/233 issue: #29593 /kind enhancement Signed-off-by: wayblink <anyang.wang@zilliz.com>pull/28910/head
parent
0ae90443ba
commit
05d735c322
5
go.mod
5
go.mod
|
@ -23,7 +23,7 @@ require (
|
|||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/klauspost/compress v1.16.7
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231220103033-abd0d12ba669
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231228051838-b5442d755fa4
|
||||
github.com/minio/minio-go/v7 v7.0.61
|
||||
github.com/prometheus/client_golang v1.14.0
|
||||
github.com/prometheus/client_model v0.3.0
|
||||
|
@ -53,7 +53,6 @@ require (
|
|||
golang.org/x/text v0.13.0
|
||||
google.golang.org/grpc v1.57.0
|
||||
google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f
|
||||
stathat.com/c/consistent v1.0.0
|
||||
)
|
||||
|
||||
require github.com/apache/arrow/go/v12 v12.0.1
|
||||
|
@ -244,10 +243,10 @@ replace (
|
|||
github.com/bketelsen/crypt => github.com/bketelsen/crypt v0.0.4 // Fix security alert for core-os/etcd
|
||||
github.com/expr-lang/expr => github.com/SimFG/expr v0.0.0-20231218130003-94d085776dc5
|
||||
github.com/go-kit/kit => github.com/go-kit/kit v0.1.0
|
||||
// github.com/milvus-io/milvus-storage/go => ../milvus-storage/go
|
||||
github.com/milvus-io/milvus/pkg => ./pkg
|
||||
github.com/streamnative/pulsarctl => github.com/xiaofan-luan/pulsarctl v0.5.1
|
||||
github.com/tecbot/gorocksdb => github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b // indirect
|
||||
// github.com/milvus-io/milvus-storage/go => ../milvus-storage/go
|
||||
)
|
||||
|
||||
exclude github.com/apache/pulsar-client-go/oauth2 v0.0.0-20211108044248-fe3b7c4e445b
|
||||
|
|
5
go.sum
5
go.sum
|
@ -583,8 +583,8 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le
|
|||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231220103033-abd0d12ba669 h1:yUtc+pVKVhmmnwTY9iyV8+EmhrNjZ74Hxm3y5QKCNyg=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231220103033-abd0d12ba669/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231228051838-b5442d755fa4 h1:nxIohfJOCMbixFAC3q4Lclmv0xg/8q6D8T7D8l258To=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231228051838-b5442d755fa4/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
|
||||
github.com/milvus-io/milvus-storage/go v0.0.0-20231109072809-1cd7b0866092 h1:UYJ7JB+QlMOoFHNdd8mUa3/lV63t9dnBX7ILXmEEWPY=
|
||||
github.com/milvus-io/milvus-storage/go v0.0.0-20231109072809-1cd7b0866092/go.mod h1:GPETMcTZq1gLY1WA6Na5kiNAKnq8SEMMiVKUZrM3sho=
|
||||
github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A=
|
||||
|
@ -1491,4 +1491,3 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
|||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
stathat.com/c/consistent v1.0.0 h1:ezyc51EGcRPJUxfHGSgJjWzJdj3NiMU9pNfLNGiXV0c=
|
||||
stathat.com/c/consistent v1.0.0/go.mod h1:QkzMWzcbB+yQBL2AttO6sgsQS/JSTapcDISJalmCDS0=
|
||||
|
|
|
@ -872,8 +872,8 @@ func (s *Server) Search(ctx context.Context, request *milvuspb.SearchRequest) (*
|
|||
return s.proxy.Search(ctx, request)
|
||||
}
|
||||
|
||||
func (s *Server) SearchV2(ctx context.Context, request *milvuspb.SearchRequestV2) (*milvuspb.SearchResults, error) {
|
||||
return s.proxy.SearchV2(ctx, request)
|
||||
func (s *Server) HybridSearch(ctx context.Context, request *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error) {
|
||||
return s.proxy.HybridSearch(ctx, request)
|
||||
}
|
||||
|
||||
func (s *Server) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error) {
|
||||
|
|
|
@ -3153,6 +3153,61 @@ func (_c *MockProxy_HasPartition_Call) RunAndReturn(run func(context.Context, *m
|
|||
return _c
|
||||
}
|
||||
|
||||
// HybridSearch provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockProxy) HybridSearch(_a0 context.Context, _a1 *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 *milvuspb.SearchResults
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error)); ok {
|
||||
return rf(_a0, _a1)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HybridSearchRequest) *milvuspb.SearchResults); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*milvuspb.SearchResults)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.HybridSearchRequest) error); ok {
|
||||
r1 = rf(_a0, _a1)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockProxy_HybridSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HybridSearch'
|
||||
type MockProxy_HybridSearch_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// HybridSearch is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
// - _a1 *milvuspb.HybridSearchRequest
|
||||
func (_e *MockProxy_Expecter) HybridSearch(_a0 interface{}, _a1 interface{}) *MockProxy_HybridSearch_Call {
|
||||
return &MockProxy_HybridSearch_Call{Call: _e.mock.On("HybridSearch", _a0, _a1)}
|
||||
}
|
||||
|
||||
func (_c *MockProxy_HybridSearch_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.HybridSearchRequest)) *MockProxy_HybridSearch_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.HybridSearchRequest))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockProxy_HybridSearch_Call) Return(_a0 *milvuspb.SearchResults, _a1 error) *MockProxy_HybridSearch_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockProxy_HybridSearch_Call) RunAndReturn(run func(context.Context, *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error)) *MockProxy_HybridSearch_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Import provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockProxy) Import(_a0 context.Context, _a1 *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
@ -4610,61 +4665,6 @@ func (_c *MockProxy_Search_Call) RunAndReturn(run func(context.Context, *milvusp
|
|||
return _c
|
||||
}
|
||||
|
||||
// SearchV2 provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockProxy) SearchV2(_a0 context.Context, _a1 *milvuspb.SearchRequestV2) (*milvuspb.SearchResults, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 *milvuspb.SearchResults
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequestV2) (*milvuspb.SearchResults, error)); ok {
|
||||
return rf(_a0, _a1)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequestV2) *milvuspb.SearchResults); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*milvuspb.SearchResults)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SearchRequestV2) error); ok {
|
||||
r1 = rf(_a0, _a1)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MockProxy_SearchV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchV2'
|
||||
type MockProxy_SearchV2_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// SearchV2 is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
// - _a1 *milvuspb.SearchRequestV2
|
||||
func (_e *MockProxy_Expecter) SearchV2(_a0 interface{}, _a1 interface{}) *MockProxy_SearchV2_Call {
|
||||
return &MockProxy_SearchV2_Call{Call: _e.mock.On("SearchV2", _a0, _a1)}
|
||||
}
|
||||
|
||||
func (_c *MockProxy_SearchV2_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.SearchRequestV2)) *MockProxy_SearchV2_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.SearchRequestV2))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockProxy_SearchV2_Call) Return(_a0 *milvuspb.SearchResults, _a1 error) *MockProxy_SearchV2_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MockProxy_SearchV2_Call) RunAndReturn(run func(context.Context, *milvuspb.SearchRequestV2) (*milvuspb.SearchResults, error)) *MockProxy_SearchV2_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SelectGrant provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockProxy) SelectGrant(_a0 context.Context, _a1 *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
|
|
@ -2725,7 +2725,7 @@ func (node *Proxy) Search(ctx context.Context, request *milvuspb.SearchRequest)
|
|||
return qt.result, nil
|
||||
}
|
||||
|
||||
func (node *Proxy) SearchV2(ctx context.Context, request *milvuspb.SearchRequestV2) (*milvuspb.SearchResults, error) {
|
||||
func (node *Proxy) HybridSearch(ctx context.Context, request *milvuspb.HybridSearchRequest) (*milvuspb.SearchResults, error) {
|
||||
return &milvuspb.SearchResults{
|
||||
Status: merr.Status(merr.WrapErrServiceInternal("unimplemented")),
|
||||
}, nil
|
||||
|
|
Loading…
Reference in New Issue