qdrant

package
v0.0.0-...-8b647c1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResponse

type CommonResponse struct {
	Result interface{} `json:"result"`
	Status interface{} `json:"status"`
	Time   float64     `json:"time"`
}

type Point

type Point struct {
	ID      string      `json:"id"`
	Payload interface{} `json:"payload"`
	Vector  []float32   `json:"vector"`
}

type PointSearchRequest

type PointSearchRequest struct {
	Params      map[string]interface{} `json:"params"`
	Vector      []float32              `json:"vector"`
	Limit       int                    `json:"limit"`
	WithPayload bool                   `json:"with_payload"`
	WithVector  bool                   `json:"with_vector"`
}

type Qdrant

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

func NewQdrant

func NewQdrant(baseURL, apiKey string) *Qdrant

func (*Qdrant) Insert

func (q *Qdrant) Insert(ctx context.Context, collection string, value []string, vector [][]float32) error

func (*Qdrant) Search

func (q *Qdrant) Search(ctx context.Context, collection, field string, vector []float32) ([]model.SearchResult, error)

type SearchResult

type SearchResult struct {
	ID      string      `json:"id"`
	Version int         `json:"version"`
	Score   float64     `json:"score"`
	Payload interface{} `json:"payload"`
	Vector  []float32   `json:"vector,omitempty"`
}

type UpsertPointRequest

type UpsertPointRequest struct {
	Points []Point `json:"points"`
}

Jump to

Keyboard shortcuts

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