vector

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalQuery

type InternalQuery struct {
	Field  string
	Vector []float32

	NumCandidates *uint32
	Boost         *float32
}

InternalQuery is used for internal functionality. Internal: This should never be used and is not supported.

func (InternalQuery) MarshalJSON

func (q InternalQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshal's this query to JSON for the search REST API.

func (InternalQuery) Validate

func (q InternalQuery) Validate() error

Validate verifies that settings in the query are valid.

type InternalSearch

type InternalSearch struct {
	Queries []InternalQuery

	VectorQueryCombination VectorQueryCombination
}

InternalSearch is used for internal functionality. Internal: This should never be used and is not supported.

func (InternalSearch) Validate

func (s InternalSearch) Validate() error

Validate verifies that settings in the search (including all queries) are valid.

type Query

type Query struct {
	// contains filtered or unexported fields
}

Query specifies a vector Query.

VOLATILE

This API is VOLATILE and subject to change at any time.

func NewQuery

func NewQuery(vectorFieldName string, vector []float32) *Query

NewQuery constructs a new vector Query.

VOLATILE

This API is VOLATILE and subject to change at any time.

func (*Query) Boost

func (q *Query) Boost(boost float32) *Query

Boost specifies the boost for this query.

func (*Query) Internal

func (q *Query) Internal() InternalQuery

Internal is used for internal functionality. Internal: This should never be used and is not supported.

func (*Query) NumCandidates

func (q *Query) NumCandidates(num uint32) *Query

NumCandidates controls how many results are returned for this query.

type Search struct {
	// contains filtered or unexported fields
}

Search specifies a vector Search.

This API is UNCOMMITTED and may change in the future.

func NewSearch

func NewSearch(queries []*Query, opts *SearchOptions) *Search

NewSearch constructs a new vector Search.

UNCOMMITTED

This API is UNCOMMITTED and may change in the future.

func (*Search) Internal

func (s *Search) Internal() InternalSearch

Internal is used for internal functionality. Internal: This should never be used and is not supported.

type SearchOptions

type SearchOptions struct {
	VectorQueryCombination VectorQueryCombination
}

SearchOptions specifies the options available to vector Search.

UNCOMMITTED

This API is UNCOMMITTED and may change in the future.

type VectorQueryCombination

type VectorQueryCombination string

VectorQueryCombination specifies how elements in the array are combined.

UNCOMMITTED

This API is UNCOMMITTED and may change in the future.

const (
	VectorQueryCombinationNotSet VectorQueryCombination = ""
	VectorQueryCombinationAnd    VectorQueryCombination = "and"
	VectorQueryCombinationOr     VectorQueryCombination = "or"
)

Jump to

Keyboard shortcuts

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