UNPKG

@zilliz/milvus2-sdk-node

Version:

Official Node.js SDK for [Milvus](https://github.com/milvus-io/milvus) vector database. Provides gRPC and HTTP clients for vector similarity search, metadata filtering, and full collection/index/user management.

97 lines (96 loc) • 2.44 kB
/// <reference types="node" /> import { ChannelOptions } from '@grpc/grpc-js'; import { Options as LoaderOption } from '@grpc/proto-loader'; import { Options } from 'generic-pool'; import { GrpcTimeOut, ResStatus } from './Common'; import type { TelemetryConfig } from '../telemetry'; /** * Configuration options for the Milvus client. */ export interface ClientConfig { id?: string; address: string; token?: string; ssl?: boolean; username?: string; password?: string; channelOptions?: ChannelOptions; option?: Record<string, string>; timeout?: number | string; maxRetries?: number; retryDelay?: number; database?: string; logLevel?: string; logPrefix?: string; tls?: { rootCertPath?: string; rootCert?: Buffer; privateKeyPath?: string; privateKey?: Buffer; certChainPath?: string; certChain?: Buffer; verifyOptions?: Record<string, any>; serverName?: string; skipCertCheck?: boolean; }; pool?: Options; __SKIP_CONNECT__?: boolean; loaderOptions?: LoaderOption; trace?: boolean; telemetry?: TelemetryConfig; isGlobal?: boolean; } export interface ServerInfo { build_tags?: string; build_time?: string; git_commit?: string; go_version?: string; deploy_mode?: string; reserved?: { [key: string]: any; }; } export interface RunAnalyzerRequest { analyzer_params?: Record<string, any>; text: string | string[]; with_detail?: boolean; with_hash?: boolean; db_name?: string; collection_name?: string; field_name?: string; analyzer_names?: string[]; } type AnalyzerToken = { token: string; start_offset: number; end_offset: number; position: number; position_length: number; hash: number; }; export type AnalyzerResult = { tokens: AnalyzerToken[]; }; export interface RunAnalyzerResponse { status: ResStatus; results: AnalyzerResult[]; } export interface AddFileResourceReq extends GrpcTimeOut { name: string; path: string; } export interface RemoveFileResourceReq extends GrpcTimeOut { name: string; } export interface ListFileResourcesReq extends GrpcTimeOut { } export interface FileResourceInfo { id: string; name: string; path: string; } export interface ListFileResourcesResponse { status: ResStatus; resources: FileResourceInfo[]; } export {};