XU XUv0.8.8
EN

API

#github.com/xulang-org/packages/qdrant

import: qdrant #github.com/xulang-org/packages/qdrant

counts: 5 函数, 19 方法, 5 类型, 0 常量, 0 方法集

扩展包 `qdrant #github.com/xulang-org/packages/qdrant`,由模块 github.com/xulang-org/packages 提供。

github.com/xulang-org/packages · 0.1.1 · 安装与使用

open

XuAPI
pub fn open(endpoint string) Client

用途

打开。

参数

endpoint string
endpoint(string)

返回

Client — 该类型的值

open_auth

XuAPI
pub fn open_auth(endpoint string, api_key string) Client

用途

打开auth。

参数

endpoint string
endpoint(string)
api_key string
api_key(string)

返回

Client — 该类型的值

struct Response

XuAPI
pub struct Response {
    pub status_code int
    pub body string
}

用途

公开结构体 `Response`。

参数

status_code int
字段(int)
body string
正文

struct Client

XuAPI
pub struct Client {
    pub host string
    pub port int
    pub api_key string
}

用途

公开结构体 `Client`。

参数

host string
主机
port int
端口
api_key string
字段(string)

new_client

XuAPI
pub fn new_client(endpoint string, api_key string) Client

用途

构造 client。

参数

endpoint string
endpoint(string)
api_key string
api_key(string)

返回

Client — 该类型的值

(&mut Client) request

XuAPI
pub fn (c &mut Client) request(method string, path string, body string) Response

用途

`&mut Client` 上的方法:请求。失败时 throw。

参数

c &mut Client
接收者 &mut Client(可变借用)
method string
method(string)
path string
文件系统路径(string)
body string
正文(string)

返回

Response — 该类型的值

(&mut Client) ping

XuAPI
pub fn (c &mut Client) ping() bool

用途

在 `&mut Client` 上调用 `ping`。

参数

c &mut Client
接收者 &mut Client(可变借用)

返回

bool — 是否成立

(&mut Client) create_collection

XuAPI
pub fn (c &mut Client) create_collection(name string, vector_size int, distance string) bool

用途

`&mut Client` 上的方法:创建collection。

参数

c &mut Client
接收者 &mut Client(可变借用)
name string
名字(string)
vector_size int
vector_size(int)
distance string
distance(string)

返回

bool — 是否成立

(&mut Client) collection_exists

XuAPI
pub fn (c &mut Client) collection_exists(name string) bool

用途

`&mut Client` 上的方法:collectionexists。

参数

c &mut Client
接收者 &mut Client(可变借用)
name string
名字(string)

返回

bool — 是否成立

(&mut Client) delete_collection

XuAPI
pub fn (c &mut Client) delete_collection(name string) bool

用途

`&mut Client` 上的方法:删除collection。

参数

c &mut Client
接收者 &mut Client(可变借用)
name string
名字(string)

返回

bool — 是否成立

struct Point

XuAPI
pub struct Point {
    pub id int
    pub vector []string
    pub payload_json string
}

用途

公开结构体 `Point`。

参数

id int
字段(int)
vector []string
字段([]string)
payload_json string
字段(string)

struct ScoredPoint

XuAPI
pub struct ScoredPoint {
    pub id int
    pub score string
    pub payload_json string
}

用途

公开结构体 `ScoredPoint`。

参数

id int
字段(int)
score string
字段(string)
payload_json string
字段(string)

(&mut Client) upsert_point

XuAPI
pub fn (c &mut Client) upsert_point(collection string, id int, vector []string, payload_json string) bool

用途

`&mut Client` 上的方法:upsertpoint。

参数

c &mut Client
接收者 &mut Client(可变借用)
collection string
collection(string)
id int
id(int)
vector []string
vector([]string)
payload_json string
payload_json(string)

返回

bool — 是否成立

struct Pool

XuAPI
pub struct Pool {
    pub host string
    pub port int
    pub api_key string
    pub state chan pool.State
    pub max_idle int
}

用途

公开结构体 `Pool`。

参数

host string
主机
port int
端口
api_key string
字段(string)
state chan pool.State
字段(通道;类型 chan pool.State)
max_idle int
字段(int)

new_pool

XuAPI
pub fn new_pool(endpoint string, api_key string, max_idle int) Pool

用途

构造 pool。

参数

endpoint string
endpoint(string)
api_key string
api_key(string)
max_idle int
max_idle(int)

返回

Pool — 该类型的值

open_pool

XuAPI
pub fn open_pool(endpoint string, api_key string, max_idle int) Pool

用途

打开pool。

参数

endpoint string
endpoint(string)
api_key string
api_key(string)
max_idle int
max_idle(int)

返回

Pool — 该类型的值

(&Pool) get

XuAPI
pub fn (p &Pool) get() Client

用途

在 `&Pool` 上调用 `get`。

参数

p &Pool
接收者 &Pool(借用)

返回

Client — 该类型的值

(&Pool) dup

XuAPI
pub fn (p &Pool) dup() Pool

用途

在 `&Pool` 上调用 `dup`。

参数

p &Pool
接收者 &Pool(借用)

返回

Pool — 该类型的值

(&Pool) get_conn

XuAPI
pub fn (p &Pool) get_conn() int

用途

`&Pool` 上的方法:读取 conn。

参数

p &Pool
接收者 &Pool(借用)

返回

int — 该类型的值

(&Pool) put_conn

XuAPI
pub fn (p &Pool) put_conn(fd int)

用途

`&Pool` 上的方法:put连接。

参数

p &Pool
接收者 &Pool(借用)
fd int
文件描述符(int)

(&Pool) discard_conn

XuAPI
pub fn (p &Pool) discard_conn(fd int)

用途

`&Pool` 上的方法:丢弃连接。

参数

p &Pool
接收者 &Pool(借用)
fd int
文件描述符(int)

(&Pool) create_collection

XuAPI
pub fn (p &Pool) create_collection(name string, vector_size int, distance string) bool

用途

`&Pool` 上的方法:创建collection。

参数

p &Pool
接收者 &Pool(借用)
name string
名字(string)
vector_size int
vector_size(int)
distance string
distance(string)

返回

bool — 是否成立

(&Pool) collection_exists

XuAPI
pub fn (p &Pool) collection_exists(name string) bool

用途

`&Pool` 上的方法:collectionexists。

参数

p &Pool
接收者 &Pool(借用)
name string
名字(string)

返回

bool — 是否成立

(&Pool) delete_collection

XuAPI
pub fn (p &Pool) delete_collection(name string) bool

用途

`&Pool` 上的方法:删除collection。

参数

p &Pool
接收者 &Pool(借用)
name string
名字(string)

返回

bool — 是否成立

(&Pool) upsert_point

XuAPI
pub fn (p &Pool) upsert_point(collection string, id int, vector []string, payload_json string) bool

用途

`&Pool` 上的方法:upsertpoint。

参数

p &Pool
接收者 &Pool(借用)
collection string
collection(string)
id int
id(int)
vector []string
vector([]string)
payload_json string
payload_json(string)

返回

bool — 是否成立

(&Pool) ping

XuAPI
pub fn (p &Pool) ping() bool

用途

在 `&Pool` 上调用 `ping`。

参数

p &Pool
接收者 &Pool(借用)

返回

bool — 是否成立

(&Pool) close

XuAPI
pub fn (p &Pool) close()

用途

`&Pool` 上的方法:关闭资源。

参数

p &Pool
接收者 &Pool(借用)