document

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(config Config, api *dfs.API) (*Client, error)

func (*Client) AddDocuments

func (c *Client) AddDocuments(collection string, propertiesToIndex []string, documents ...*Document) error

func (*Client) CreateCollection

func (c *Client) CreateCollection(col *Collection) error

func (*Client) DeleteCollection

func (c *Client) DeleteCollection(collection string) error

func (*Client) GetCollections

func (c *Client) GetCollections() ([]*Collection, error)

func (*Client) GetDocument

func (c *Client) GetDocument(collection, property, value string) ([]byte, error)

func (*Client) GetNearDocuments

func (c *Client) GetNearDocuments(collection, text string, distance float32, limit int) ([][]byte, []float32, error)

func (*Client) GetNearDocumentsByVector added in v0.1.5

func (c *Client) GetNearDocumentsByVector(collection string, vector []float32, distance float32, limit int) ([][]byte, []float32, error)

func (*Client) Login

func (c *Client) Login(username, password string) error

func (*Client) OpenPod

func (c *Client) OpenPod(pod string) error

type Collection

type Collection struct {
	Name    string
	Indexes map[string]collection.IndexType
}

type Config

type Config struct {
	Verbose       bool
	VectorizerUrl string
}

Config for fairOS-dfs

type Document

type Document struct {
	ID         string                 `json:"id"`
	Properties map[string]interface{} `json:"properties"`
}

Jump to

Keyboard shortcuts

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