Documentation ¶
Index ¶
- func AddOwnership(objs []*Object, node, shard string)
- func DocIDFromBinary(in []byte) (uint64, error)
- func NewErrNotFoundf(docID uint64, msg string, args ...interface{}) error
- func ParseAndExtractBoolArrayProp(data []byte, propName string) ([]bool, bool, error)
- func ParseAndExtractNumberArrayProp(data []byte, propName string) ([]float64, bool, error)
- func ParseAndExtractProperty(data []byte, propName string) ([]string, bool, error)
- func ParseAndExtractTextProp(data []byte, propName string) ([]string, bool, error)
- func SearchResults(in []*Object, additional additional.Properties, tenant string) search.Results
- func SearchResultsWithDists(in []*Object, addl additional.Properties, dists []float32) search.Results
- func SearchResultsWithScore(in []*Object, scores []float32, additional additional.Properties, ...) search.Results
- func UnmarshalPropertiesFromObject(data []byte, properties *map[string]interface{}, ...) error
- func VectorFromBinary(in []byte, buffer []float32, targetVector string) ([]float32, error)
- type ErrNotFound
- type Object
- func FromBinary(data []byte) (*Object, error)
- func FromBinaryOptional(data []byte, addProp additional.Properties) (*Object, error)
- func FromBinaryUUIDOnly(data []byte) (*Object, error)
- func FromObject(object *models.Object, vector []float32, vectors models.Vectors) *Object
- func New(docID uint64) *Object
- func ObjectsByDocID(bucket bucket, ids []uint64, additional additional.Properties) ([]*Object, error)
- func (ko *Object) AdditionalProperties() models.AdditionalProperties
- func (ko *Object) Class() schema.ClassName
- func (ko *Object) CreationTimeUnix() int64
- func (ko *Object) DeepCopyDangerous() *Object
- func (ko *Object) ExplainScore() string
- func (ko *Object) GetDocID() uint64
- func (ko *Object) ID() strfmt.UUID
- func (ko *Object) LastUpdateTimeUnix() int64
- func (ko *Object) MarshalBinary() ([]byte, error)
- func (ko *Object) Properties() models.PropertySchema
- func (ko *Object) PropertiesWithAdditional(additional additional.Properties) models.PropertySchema
- func (ko *Object) SearchResult(additional additional.Properties, tenant string) *search.Result
- func (ko *Object) SearchResultWithDist(addl additional.Properties, dist float32) search.Result
- func (ko *Object) SearchResultWithScore(addl additional.Properties, score float32) search.Result
- func (ko *Object) SearchResultWithScoreAndTenant(addl additional.Properties, score float32, tenant string) search.Result
- func (ko *Object) SetClass(class string)
- func (ko *Object) SetDocID(id uint64)
- func (ko *Object) SetID(id strfmt.UUID)
- func (ko *Object) SetProperties(schema models.PropertySchema)
- func (ko *Object) UnmarshalBinary(data []byte) error
- func (ko *Object) Valid() bool
- func (ko *Object) VectorWeights() models.VectorWeights
- type Vectors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOwnership ¶ added in v1.19.0
func DocIDFromBinary ¶
func NewErrNotFoundf ¶
func ParseAndExtractBoolArrayProp ¶ added in v1.21.2
func ParseAndExtractProperty ¶
func ParseAndExtractTextProp ¶
func SearchResults ¶
func SearchResults(in []*Object, additional additional.Properties, tenant string) search.Results
func SearchResultsWithDists ¶
func SearchResultsWithDists(in []*Object, addl additional.Properties, dists []float32, ) search.Results
func SearchResultsWithScore ¶ added in v1.24.5
func SearchResultsWithScore(in []*Object, scores []float32, additional additional.Properties, tenant string) search.Results
func UnmarshalPropertiesFromObject ¶
func UnmarshalPropertiesFromObject(data []byte, properties *map[string]interface{}, aggregationProperties []string, propStrings [][]string) error
UnmarshalPropertiesFromObject only unmarshals and returns the properties part of the object
Check MarshalBinary for the order of elements in the input array
Types ¶
type ErrNotFound ¶
func (ErrNotFound) Error ¶
func (err ErrNotFound) Error() string
type Object ¶
type Object struct { MarshallerVersion uint8 Object models.Object `json:"object"` Vector []float32 `json:"vector"` VectorLen int `json:"-"` BelongsToNode string `json:"-"` BelongsToShard string `json:"-"` IsConsistent bool `json:"-"` DocID uint64 Vectors map[string][]float32 `json:"vectors"` }
func FromBinary ¶
func FromBinaryOptional ¶
func FromBinaryOptional(data []byte, addProp additional.Properties, ) (*Object, error)
func FromBinaryUUIDOnly ¶ added in v1.18.1
func FromObject ¶
func ObjectsByDocID ¶
func ObjectsByDocID(bucket bucket, ids []uint64, additional additional.Properties, ) ([]*Object, error)
func (*Object) AdditionalProperties ¶
func (ko *Object) AdditionalProperties() models.AdditionalProperties
AdditionalProperties groups all properties which are stored with the object and not generated at runtime
func (*Object) CreationTimeUnix ¶
func (*Object) DeepCopyDangerous ¶
DeepCopyDangerous creates a deep copy of the underlying Object WARNING: This was purpose built for the batch ref usecase and only covers the situations that are required there. This means that cases which aren't reflected in that usecase may still contain references. Thus the suffix "Dangerous". If needed, make sure everything is copied and remove the suffix.
func (*Object) ExplainScore ¶
func (*Object) LastUpdateTimeUnix ¶
func (*Object) MarshalBinary ¶
func (*Object) Properties ¶
func (ko *Object) Properties() models.PropertySchema
func (*Object) PropertiesWithAdditional ¶
func (ko *Object) PropertiesWithAdditional( additional additional.Properties, ) models.PropertySchema
func (*Object) SearchResult ¶
func (ko *Object) SearchResult(additional additional.Properties, tenant string) *search.Result
func (*Object) SearchResultWithDist ¶
func (ko *Object) SearchResultWithDist(addl additional.Properties, dist float32) search.Result
func (*Object) SearchResultWithScore ¶ added in v1.24.0
func (ko *Object) SearchResultWithScore(addl additional.Properties, score float32) search.Result
func (*Object) SearchResultWithScoreAndTenant ¶ added in v1.24.5
func (ko *Object) SearchResultWithScoreAndTenant(addl additional.Properties, score float32, tenant string) search.Result
func (*Object) SetProperties ¶
func (ko *Object) SetProperties(schema models.PropertySchema)
func (*Object) UnmarshalBinary ¶
UnmarshalBinary is the versioned way to unmarshal a kind object from binary, see MarshalBinary for the exact contents of each version
func (*Object) VectorWeights ¶
func (ko *Object) VectorWeights() models.VectorWeights