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 Base64Vector string 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.
func NewBase64Query ¶ added in v2.9.0
NewBase64Query constructs a new vector Query using a Base64-encoded sequence of little-endian IEEE 754 floats.
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 ¶
NumCandidates controls how many results are returned for this query.
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
Search specifies a vector Search.
func NewSearch ¶
func NewSearch(queries []*Query, opts *SearchOptions) *Search
NewSearch constructs a new vector Search.
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.
type VectorQueryCombination ¶
type VectorQueryCombination string
VectorQueryCombination specifies how elements in the array are combined.
const ( VectorQueryCombinationNotSet VectorQueryCombination = "" VectorQueryCombinationAnd VectorQueryCombination = "and" VectorQueryCombinationOr VectorQueryCombination = "or" )