import { Chunk } from "../types.js"; import { BaseHandshake, BaseHandshakeOptions, HandshakeSearchResult } from "./base.js"; //#region src/handshakes/elastic.d.ts interface ElasticHandshakeOptions extends BaseHandshakeOptions { /** Pre-initialized Elasticsearch client. */ client: ElasticClient; /** Index name in Elasticsearch. */ indexName: string; } interface ElasticClient { bulk(params: { operations: Array>; refresh?: boolean | 'wait_for'; }): Promise<{ errors: boolean; items: Array>; }>; search(params: { index: string; knn?: { field: string; query_vector: number[]; k: number; num_candidates: number; }; size?: number; }): Promise<{ hits: { total: { value: number; }; hits: Array<{ _id: string; _score: number; _source: Record; }>; }; }>; count(params: { index: string; }): Promise<{ count: number; }>; } declare class ElasticHandshake extends BaseHandshake { private client; private indexName; constructor(options: ElasticHandshakeOptions); write(chunks: Chunk | Chunk[]): Promise; search(query: string, options?: { limit?: number; }): Promise; searchByVector(embedding: number[], options?: { limit?: number; }): Promise; count(): Promise; } //#endregion export { ElasticClient, ElasticHandshake, ElasticHandshakeOptions }; //# sourceMappingURL=elastic.d.ts.map