function

package
v0.10.3-0...-d6b7819 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

type MockFunctionRunner struct {
	mock.Mock
}

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 (*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

type MockFunctionRunner_BatchRun_Call struct {
	*mock.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

type MockFunctionRunner_Close_Call struct {
	*mock.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 (*MockFunctionRunner_Close_Call) Run

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

Close is a helper method to define mock.On call

func (*MockFunctionRunner_Expecter) GetInputFields

GetInputFields is a helper method to define mock.On call

func (*MockFunctionRunner_Expecter) GetOutputFields

GetOutputFields is a helper method to define mock.On call

func (*MockFunctionRunner_Expecter) GetSchema

GetSchema is a helper method to define mock.On call

type MockFunctionRunner_GetInputFields_Call

type MockFunctionRunner_GetInputFields_Call struct {
	*mock.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 (*MockFunctionRunner_GetInputFields_Call) Run

func (*MockFunctionRunner_GetInputFields_Call) RunAndReturn

type MockFunctionRunner_GetOutputFields_Call

type MockFunctionRunner_GetOutputFields_Call struct {
	*mock.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 (*MockFunctionRunner_GetOutputFields_Call) Run

func (*MockFunctionRunner_GetOutputFields_Call) RunAndReturn

type MockFunctionRunner_GetSchema_Call

type MockFunctionRunner_GetSchema_Call struct {
	*mock.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 (*MockFunctionRunner_GetSchema_Call) Run

func (*MockFunctionRunner_GetSchema_Call) RunAndReturn

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 (*MultiAnalyzerBM25FunctionRunner) GetInputFields

func (v *MultiAnalyzerBM25FunctionRunner) GetInputFields() []*schemapb.FieldSchema

func (*MultiAnalyzerBM25FunctionRunner) GetOutputFields

func (v *MultiAnalyzerBM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema

func (*MultiAnalyzerBM25FunctionRunner) GetSchema

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.
ali
tei

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL