Documentation
¶
Index ¶
- Variables
- func GetLabels(collection, key string, opts ...NamespaceOption) ([]string, error)
- func GetNamespaces(collection string) ([]string, error)
- func GetText(collection, key string, opts ...NamespaceOption) (string, error)
- func GetTexts(collection string, opts ...NamespaceOption) (map[string]string, error)
- func GetVector(collection, searchMethod, key string, opts ...NamespaceOption) ([]float32, error)
- type CollectionClassificationLabelObject
- type CollectionClassificationResult
- type CollectionClassificationResultObject
- type CollectionMutationResult
- func Remove(collection, key string, opts ...NamespaceOption) (*CollectionMutationResult, error)
- func Upsert(collection string, key *string, text string, labels []string, ...) (*CollectionMutationResult, error)
- func UpsertBatch(collection string, keys []string, texts []string, labelsArr [][]string, ...) (*CollectionMutationResult, error)
- type CollectionSearchResult
- type CollectionSearchResultObject
- type CollectionStatus
- type NamespaceOption
- type NamespaceOptions
- type SearchMethodMutationResult
- type SearchOption
- type SearchOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ComputeDistanceCallStack = testutils.NewCallStack()
View Source
var DeleteCallStack = testutils.NewCallStack()
View Source
var GetLabelsCallStack = testutils.NewCallStack()
View Source
var GetNamespacesCallStack = testutils.NewCallStack()
View Source
var GetTextCallStack = testutils.NewCallStack()
View Source
var GetTextsCallStack = testutils.NewCallStack()
View Source
var GetVectorCallStack = testutils.NewCallStack()
View Source
var NnClassifyCallStack = testutils.NewCallStack()
View Source
var RecomputeSearchMethodCallStack = testutils.NewCallStack()
View Source
var SearchByVectorCallStack = testutils.NewCallStack()
View Source
var SearchCallStack = testutils.NewCallStack()
View Source
var UpsertCallStack = testutils.NewCallStack()
Functions ¶
func GetNamespaces ¶
Types ¶
type CollectionClassificationResult ¶
type CollectionClassificationResult struct {
Collection string
Status string
Error string
SearchMethod string
LabelsResult []*CollectionClassificationLabelObject
Cluster []*CollectionClassificationResultObject
}
func NnClassify ¶
func NnClassify(collection, searchMethod, text string, opts ...NamespaceOption) (*CollectionClassificationResult, error)
type CollectionMutationResult ¶
type CollectionMutationResult struct {
Collection string
Status string
Error string
Operation string
Keys []string
}
func Remove ¶
func Remove(collection, key string, opts ...NamespaceOption) (*CollectionMutationResult, error)
func Upsert ¶
func Upsert(collection string, key *string, text string, labels []string, opts ...NamespaceOption) (*CollectionMutationResult, error)
func UpsertBatch ¶
func UpsertBatch(collection string, keys []string, texts []string, labelsArr [][]string, opts ...NamespaceOption) (*CollectionMutationResult, error)
type CollectionSearchResult ¶
type CollectionSearchResult struct {
Collection string
Status string
Error string
SearchMethod string
Objects []*CollectionSearchResultObject
}
func Search ¶
func Search(collection, searchMethod, text string, opts ...SearchOption) (*CollectionSearchResult, error)
func SearchByVector ¶
func SearchByVector(collection, searchMethod string, vector []float32, opts ...SearchOption) (*CollectionSearchResult, error)
type CollectionSearchResultObject ¶
type CollectionSearchResultObject struct {
Namespace string
Key string
Text string
Labels []string
Distance float64
Score float64
}
func ComputeDistance ¶
func ComputeDistance(collection, searchMethod, key1, key2 string, opts ...NamespaceOption) (*CollectionSearchResultObject, error)
type CollectionStatus ¶
type CollectionStatus = string
const ( Success CollectionStatus = "success" Error CollectionStatus = "error" )
type NamespaceOption ¶
type NamespaceOption func(*NamespaceOptions)
func WithNamespace ¶
func WithNamespace(namespace string) NamespaceOption
type NamespaceOptions ¶
type NamespaceOptions struct {
// contains filtered or unexported fields
}
type SearchMethodMutationResult ¶
type SearchMethodMutationResult struct {
Collection string
Status string
Error string
Operation string
SearchMethod string
}
func RecomputeSearchMethod ¶
func RecomputeSearchMethod(collection, searchMethod string, opts ...NamespaceOption) (*SearchMethodMutationResult, error)
type SearchOption ¶
type SearchOption func(*SearchOptions)
func WithLimit ¶
func WithLimit(limit int) SearchOption
func WithNamespaces ¶
func WithNamespaces(namespaces []string) SearchOption
func WithReturnText ¶
func WithReturnText(returnText bool) SearchOption
type SearchOptions ¶
type SearchOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.