open
pub fn open(endpoint string) ClientPurpose
Public API convenience helpers for Qdrant Vector Database
Parameters
endpointstring- endpoint (string)
Returns
Client — a value of this type
API
#github.com/xulang-org/packages/qdrantPublic API convenience helpers for Qdrant Vector Database
github.com/xulang-org/packages · 0.1.1 · Install and use
openpub fn open(endpoint string) ClientPublic API convenience helpers for Qdrant Vector Database
endpoint stringClient — a value of this type
open_authpub fn open_auth(endpoint string, api_key string) ClientOpen auth.
endpoint stringapi_key stringClient — a value of this type
struct Responsepub struct Response {
pub status_code int
pub body string
}Public struct `Response`.
status_code intbody stringstruct Clientpub struct Client {
pub host string
pub port int
pub api_key string
}Public struct `Client`.
host stringport intapi_key stringnew_clientpub fn new_client(endpoint string, api_key string) ClientConstruct client.
endpoint stringapi_key stringClient — a value of this type
(&mut Client) requestpub fn (c &mut Client) request(method string, path string, body string) ResponseCall `request` on `&mut Client`. Throws on failure.
c &mut Clientmethod stringpath stringbody stringResponse — a value of this type
(&mut Client) pingpub fn (c &mut Client) ping() boolCall `ping` on `&mut Client`.
c &mut Clientbool — true or false
(&mut Client) create_collectionpub fn (c &mut Client) create_collection(name string, vector_size int, distance string) boolMethod on `&mut Client`: create collection.
c &mut Clientname stringvector_size intdistance stringbool — true or false
(&mut Client) collection_existspub fn (c &mut Client) collection_exists(name string) boolMethod on `&mut Client`: collection exists.
c &mut Clientname stringbool — true or false
(&mut Client) delete_collectionpub fn (c &mut Client) delete_collection(name string) boolMethod on `&mut Client`: delete collection.
c &mut Clientname stringbool — true or false
struct Pointpub struct Point {
pub id int
pub vector []string
pub payload_json string
}Public struct `Point`.
id intvector []stringpayload_json stringstruct ScoredPointpub struct ScoredPoint {
pub id int
pub score string
pub payload_json string
}Public struct `ScoredPoint`.
id intscore stringpayload_json string(&mut Client) upsert_pointpub fn (c &mut Client) upsert_point(collection string, id int, vector []string, payload_json string) boolMethod on `&mut Client`: upsert point.
c &mut Clientcollection stringid intvector []stringpayload_json stringbool — true or false
(&mut Client) searchpub fn (c &mut Client) search(collection string, vector []string, limit int) []ScoredPointMethod on `&mut Client`: binary search. Throws on failure.
c &mut Clientcollection stringvector []stringlimit int[]ScoredPoint — slice result
struct Poolpub struct Pool {
pub host string
pub port int
pub api_key string
pub state chan pool.State
pub max_idle int
}Connection Pool for Qdrant Vector Database. Manages reusable TCP/HTTP socket connections.
host stringport intapi_key stringstate chan pool.Statemax_idle intnew_poolpub fn new_pool(endpoint string, api_key string, max_idle int) PoolConstruct pool.
endpoint stringapi_key stringmax_idle intPool — a value of this type
open_poolpub fn open_pool(endpoint string, api_key string, max_idle int) PoolOpen pool.
endpoint stringapi_key stringmax_idle intPool — a value of this type
(&Pool) getpub fn (p &Pool) get() ClientCall `get` on `&Pool`.
p &PoolClient — a value of this type
(&Pool) duppub fn (p &Pool) dup() PoolShares sockets and close state; clones configuration strings.
p &PoolPool — a value of this type
(&Pool) get_connpub fn (p &Pool) get_conn() intMethod on `&Pool`: read conn.
p &Poolint — a value of this type
(&Pool) put_connpub fn (p &Pool) put_conn(fd int)Method on `&Pool`: put connection.
p &Poolfd int(&Pool) discard_connpub fn (p &Pool) discard_conn(fd int)Method on `&Pool`: discard connection.
p &Poolfd int(&Pool) create_collectionpub fn (p &Pool) create_collection(name string, vector_size int, distance string) boolMethod on `&Pool`: create collection.
p &Poolname stringvector_size intdistance stringbool — true or false
(&Pool) collection_existspub fn (p &Pool) collection_exists(name string) boolMethod on `&Pool`: collection exists.
p &Poolname stringbool — true or false
(&Pool) delete_collectionpub fn (p &Pool) delete_collection(name string) boolMethod on `&Pool`: delete collection.
p &Poolname stringbool — true or false
(&Pool) upsert_pointpub fn (p &Pool) upsert_point(collection string, id int, vector []string, payload_json string) boolMethod on `&Pool`: upsert point.
p &Poolcollection stringid intvector []stringpayload_json stringbool — true or false
(&Pool) searchpub fn (p &Pool) search(collection string, vector []string, limit int) []ScoredPointMethod on `&Pool`: binary search. Throws on failure.
p &Poolcollection stringvector []stringlimit int[]ScoredPoint — slice result
(&Pool) pingpub fn (p &Pool) ping() boolCall `ping` on `&Pool`.
p &Poolbool — true or false
(&Pool) closepub fn (p &Pool) close()Method on `&Pool`: close the resource.
p &Pool