search

package
v1.22.12 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalRef

type LocalRef struct {
	Class  string
	Fields map[string]interface{}
}

LocalRef to be filled by the search backend to indicate that the particular reference field is a local ref and does not require further resolving, as opposed to a NetworkRef.

type Result

type Result struct {
	ID                   strfmt.UUID
	ClassName            string
	Score                float32
	SecondarySortValue   float32
	ExplainScore         string
	Dist                 float32
	Vector               []float32
	Beacon               string
	Certainty            float32
	Schema               models.PropertySchema
	Created              int64
	Updated              int64
	AdditionalProperties models.AdditionalProperties
	VectorWeights        map[string]string
	IsConsistent         bool
	Tenant               string

	// Dimensions in case search was vector-based, 0 otherwise
	Dims int
}

Result contains some info of a concept (kind), but not all. For additional info the ID can be used to retrieve the full concept from the connector storage

func (Result) Object

func (r Result) Object() *models.Object

func (Result) ObjectWithVector

func (r Result) ObjectWithVector(includeVector bool) *models.Object

type Results

type Results []Result

func (Results) Objects

func (rs Results) Objects() []*models.Object

func (Results) ObjectsWithVector

func (rs Results) ObjectsWithVector(includeVector bool) []*models.Object

type SelectClass

type SelectClass struct {
	ClassName            string                `json:"className"`
	RefProperties        SelectProperties      `json:"refProperties"`
	AdditionalProperties additional.Properties `json:"additionalProperties"`
}

type SelectProperties

type SelectProperties []SelectProperty

func (SelectProperties) FindProperty

func (sp SelectProperties) FindProperty(propName string) *SelectProperty

func (SelectProperties) HasProps added in v1.22.0

func (sp SelectProperties) HasProps() bool

func (SelectProperties) HasRefs

func (sp SelectProperties) HasRefs() bool

func (SelectProperties) ShouldResolve

func (sp SelectProperties) ShouldResolve(path []string) (bool, error)

type SelectProperty

type SelectProperty struct {
	Name string `json:"name"`

	IsPrimitive bool `json:"isPrimitive"`

	IsObject bool `json:"isObject"`

	// Include the __typename in all the Refs below.
	IncludeTypeName bool `json:"includeTypeName"`

	// Not a primitive nor nested type? Then select these properties.
	Refs []SelectClass `json:"refs"`

	// Nested type? Then select these properties.
	Props []SelectProperty `json:"objs"`
}

func (SelectProperty) FindSelectClass

func (sp SelectProperty) FindSelectClass(className schema.ClassName) *SelectClass

FindSelectClass by specifying the exact class name

func (SelectProperty) FindSelectProperty added in v1.22.0

func (sp SelectProperty) FindSelectProperty(name string) *SelectProperty

FindSelectObject by specifying the exact object name

func (SelectProperty) HasPeer

func (sp SelectProperty) HasPeer(peerName string) bool

HasPeer returns true if any of the referenced classes are from the specified peer

Jump to

Keyboard shortcuts

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