Documentation
¶
Index ¶
- type Analyzer
- type BM25FunctionRunner
- func (v *BM25FunctionRunner) BatchAnalyze(withDetail bool, withHash bool, inputs ...any) ([][]*milvuspb.AnalyzerToken, error)
- func (v *BM25FunctionRunner) BatchRun(inputs ...any) ([]any, error)
- func (v *BM25FunctionRunner) Close()
- func (v *BM25FunctionRunner) GetInputFields() []*schemapb.FieldSchema
- func (v *BM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema
- func (v *BM25FunctionRunner) GetSchema() *schemapb.FunctionSchema
- type FunctionRunner
- type MockFunctionRunner
- func (_m *MockFunctionRunner) BatchRun(inputs ...interface{}) ([]interface{}, error)
- func (_m *MockFunctionRunner) Close()
- func (_m *MockFunctionRunner) EXPECT() *MockFunctionRunner_Expecter
- func (_m *MockFunctionRunner) GetInputFields() []*schemapb.FieldSchema
- func (_m *MockFunctionRunner) GetOutputFields() []*schemapb.FieldSchema
- func (_m *MockFunctionRunner) GetSchema() *schemapb.FunctionSchema
- type MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) Return(_a0 []interface{}, _a1 error) *MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) Run(run func(inputs ...interface{})) *MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) RunAndReturn(run func(...interface{}) ([]interface{}, error)) *MockFunctionRunner_BatchRun_Call
- type MockFunctionRunner_Close_Call
- type MockFunctionRunner_Expecter
- func (_e *MockFunctionRunner_Expecter) BatchRun(inputs ...interface{}) *MockFunctionRunner_BatchRun_Call
- func (_e *MockFunctionRunner_Expecter) Close() *MockFunctionRunner_Close_Call
- func (_e *MockFunctionRunner_Expecter) GetInputFields() *MockFunctionRunner_GetInputFields_Call
- func (_e *MockFunctionRunner_Expecter) GetOutputFields() *MockFunctionRunner_GetOutputFields_Call
- func (_e *MockFunctionRunner_Expecter) GetSchema() *MockFunctionRunner_GetSchema_Call
- type MockFunctionRunner_GetInputFields_Call
- func (_c *MockFunctionRunner_GetInputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetInputFields_Call
- func (_c *MockFunctionRunner_GetInputFields_Call) Run(run func()) *MockFunctionRunner_GetInputFields_Call
- func (_c *MockFunctionRunner_GetInputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetInputFields_Call
- type MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) Run(run func()) *MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
- type MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) Return(_a0 *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) Run(run func()) *MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) RunAndReturn(run func() *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
- type MultiAnalyzerBM25FunctionRunner
- func (v *MultiAnalyzerBM25FunctionRunner) BatchAnalyze(withDetail bool, withHash bool, inputs ...any) ([][]*milvuspb.AnalyzerToken, error)
- func (v *MultiAnalyzerBM25FunctionRunner) BatchRun(inputs ...any) ([]any, error)
- func (v *MultiAnalyzerBM25FunctionRunner) Close()
- func (v *MultiAnalyzerBM25FunctionRunner) GetInputFields() []*schemapb.FieldSchema
- func (v *MultiAnalyzerBM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema
- func (v *MultiAnalyzerBM25FunctionRunner) GetSchema() *schemapb.FunctionSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface { BatchAnalyze(withDetail bool, withHash bool, inputs ...any) ([][]*milvuspb.AnalyzerToken, error) GetInputFields() []*schemapb.FieldSchema }
type BM25FunctionRunner ¶
type BM25FunctionRunner struct {
// contains filtered or unexported fields
}
BM25 Runner Input: string Output: map[uint32]float32
func (*BM25FunctionRunner) BatchAnalyze ¶
func (v *BM25FunctionRunner) BatchAnalyze(withDetail bool, withHash bool, inputs ...any) ([][]*milvuspb.AnalyzerToken, error)
func (*BM25FunctionRunner) BatchRun ¶
func (v *BM25FunctionRunner) BatchRun(inputs ...any) ([]any, error)
func (*BM25FunctionRunner) Close ¶
func (v *BM25FunctionRunner) Close()
func (*BM25FunctionRunner) GetInputFields ¶
func (v *BM25FunctionRunner) GetInputFields() []*schemapb.FieldSchema
func (*BM25FunctionRunner) GetOutputFields ¶
func (v *BM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema
func (*BM25FunctionRunner) GetSchema ¶
func (v *BM25FunctionRunner) GetSchema() *schemapb.FunctionSchema
type FunctionRunner ¶
type FunctionRunner interface { BatchRun(inputs ...any) ([]any, error) GetSchema() *schemapb.FunctionSchema GetOutputFields() []*schemapb.FieldSchema GetInputFields() []*schemapb.FieldSchema Close() }
func NewBM25FunctionRunner ¶
func NewBM25FunctionRunner(coll *schemapb.CollectionSchema, schema *schemapb.FunctionSchema) (FunctionRunner, error)
func NewFunctionRunner ¶
func NewFunctionRunner(coll *schemapb.CollectionSchema, schema *schemapb.FunctionSchema) (FunctionRunner, error)
type MockFunctionRunner ¶
MockFunctionRunner is an autogenerated mock type for the FunctionRunner type
func NewMockFunctionRunner ¶
func NewMockFunctionRunner(t interface { mock.TestingT Cleanup(func()) }) *MockFunctionRunner
NewMockFunctionRunner creates a new instance of MockFunctionRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockFunctionRunner) BatchRun ¶
func (_m *MockFunctionRunner) BatchRun(inputs ...interface{}) ([]interface{}, error)
BatchRun provides a mock function with given fields: inputs
func (*MockFunctionRunner) Close ¶
func (_m *MockFunctionRunner) Close()
Close provides a mock function with no fields
func (*MockFunctionRunner) EXPECT ¶
func (_m *MockFunctionRunner) EXPECT() *MockFunctionRunner_Expecter
func (*MockFunctionRunner) GetInputFields ¶
func (_m *MockFunctionRunner) GetInputFields() []*schemapb.FieldSchema
GetInputFields provides a mock function with no fields
func (*MockFunctionRunner) GetOutputFields ¶
func (_m *MockFunctionRunner) GetOutputFields() []*schemapb.FieldSchema
GetOutputFields provides a mock function with no fields
func (*MockFunctionRunner) GetSchema ¶
func (_m *MockFunctionRunner) GetSchema() *schemapb.FunctionSchema
GetSchema provides a mock function with no fields
type MockFunctionRunner_BatchRun_Call ¶
MockFunctionRunner_BatchRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchRun'
func (*MockFunctionRunner_BatchRun_Call) Return ¶
func (_c *MockFunctionRunner_BatchRun_Call) Return(_a0 []interface{}, _a1 error) *MockFunctionRunner_BatchRun_Call
func (*MockFunctionRunner_BatchRun_Call) Run ¶
func (_c *MockFunctionRunner_BatchRun_Call) Run(run func(inputs ...interface{})) *MockFunctionRunner_BatchRun_Call
func (*MockFunctionRunner_BatchRun_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_BatchRun_Call) RunAndReturn(run func(...interface{}) ([]interface{}, error)) *MockFunctionRunner_BatchRun_Call
type MockFunctionRunner_Close_Call ¶
MockFunctionRunner_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockFunctionRunner_Close_Call) Return ¶
func (_c *MockFunctionRunner_Close_Call) Return() *MockFunctionRunner_Close_Call
func (*MockFunctionRunner_Close_Call) Run ¶
func (_c *MockFunctionRunner_Close_Call) Run(run func()) *MockFunctionRunner_Close_Call
func (*MockFunctionRunner_Close_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_Close_Call) RunAndReturn(run func()) *MockFunctionRunner_Close_Call
type MockFunctionRunner_Expecter ¶
type MockFunctionRunner_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFunctionRunner_Expecter) BatchRun ¶
func (_e *MockFunctionRunner_Expecter) BatchRun(inputs ...interface{}) *MockFunctionRunner_BatchRun_Call
BatchRun is a helper method to define mock.On call
- inputs ...interface{}
func (*MockFunctionRunner_Expecter) Close ¶
func (_e *MockFunctionRunner_Expecter) Close() *MockFunctionRunner_Close_Call
Close is a helper method to define mock.On call
func (*MockFunctionRunner_Expecter) GetInputFields ¶
func (_e *MockFunctionRunner_Expecter) GetInputFields() *MockFunctionRunner_GetInputFields_Call
GetInputFields is a helper method to define mock.On call
func (*MockFunctionRunner_Expecter) GetOutputFields ¶
func (_e *MockFunctionRunner_Expecter) GetOutputFields() *MockFunctionRunner_GetOutputFields_Call
GetOutputFields is a helper method to define mock.On call
func (*MockFunctionRunner_Expecter) GetSchema ¶
func (_e *MockFunctionRunner_Expecter) GetSchema() *MockFunctionRunner_GetSchema_Call
GetSchema is a helper method to define mock.On call
type MockFunctionRunner_GetInputFields_Call ¶
MockFunctionRunner_GetInputFields_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInputFields'
func (*MockFunctionRunner_GetInputFields_Call) Return ¶
func (_c *MockFunctionRunner_GetInputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetInputFields_Call
func (*MockFunctionRunner_GetInputFields_Call) Run ¶
func (_c *MockFunctionRunner_GetInputFields_Call) Run(run func()) *MockFunctionRunner_GetInputFields_Call
func (*MockFunctionRunner_GetInputFields_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_GetInputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetInputFields_Call
type MockFunctionRunner_GetOutputFields_Call ¶
MockFunctionRunner_GetOutputFields_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOutputFields'
func (*MockFunctionRunner_GetOutputFields_Call) Return ¶
func (_c *MockFunctionRunner_GetOutputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
func (*MockFunctionRunner_GetOutputFields_Call) Run ¶
func (_c *MockFunctionRunner_GetOutputFields_Call) Run(run func()) *MockFunctionRunner_GetOutputFields_Call
func (*MockFunctionRunner_GetOutputFields_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_GetOutputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
type MockFunctionRunner_GetSchema_Call ¶
MockFunctionRunner_GetSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchema'
func (*MockFunctionRunner_GetSchema_Call) Return ¶
func (_c *MockFunctionRunner_GetSchema_Call) Return(_a0 *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
func (*MockFunctionRunner_GetSchema_Call) Run ¶
func (_c *MockFunctionRunner_GetSchema_Call) Run(run func()) *MockFunctionRunner_GetSchema_Call
func (*MockFunctionRunner_GetSchema_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_GetSchema_Call) RunAndReturn(run func() *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
type MultiAnalyzerBM25FunctionRunner ¶
type MultiAnalyzerBM25FunctionRunner struct {
// contains filtered or unexported fields
}
BM25 Runner with Multi Analyzer Input: string string // text, analyzer name Output: map[uint32]float32
func NewMultiAnalyzerBM25FunctionRunner ¶
func NewMultiAnalyzerBM25FunctionRunner(coll *schemapb.CollectionSchema, schema *schemapb.FunctionSchema, inputField, outputField *schemapb.FieldSchema, params string) (*MultiAnalyzerBM25FunctionRunner, error)
func (*MultiAnalyzerBM25FunctionRunner) BatchAnalyze ¶
func (v *MultiAnalyzerBM25FunctionRunner) BatchAnalyze(withDetail bool, withHash bool, inputs ...any) ([][]*milvuspb.AnalyzerToken, error)
func (*MultiAnalyzerBM25FunctionRunner) BatchRun ¶
func (v *MultiAnalyzerBM25FunctionRunner) BatchRun(inputs ...any) ([]any, error)
func (*MultiAnalyzerBM25FunctionRunner) Close ¶
func (v *MultiAnalyzerBM25FunctionRunner) Close()
func (*MultiAnalyzerBM25FunctionRunner) GetInputFields ¶
func (v *MultiAnalyzerBM25FunctionRunner) GetInputFields() []*schemapb.FieldSchema
func (*MultiAnalyzerBM25FunctionRunner) GetOutputFields ¶
func (v *MultiAnalyzerBM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema
func (*MultiAnalyzerBM25FunctionRunner) GetSchema ¶
func (v *MultiAnalyzerBM25FunctionRunner) GetSchema() *schemapb.FunctionSchema
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
* # Licensed to the LF AI & Data foundation under one * # or more contributor license agreements.
|
* # Licensed to the LF AI & Data foundation under one * # or more contributor license agreements. |