import type { FieldPolicyRegistry } from "../contract.js"; import type { IndexerSlice, SearchRequest } from "./contract.js"; export interface TypesenseSearchQuery { q: string; query_by: string; filter_by?: string; facet_by?: string; sort_by?: string; per_page?: number; page?: number; vector_query?: string; prefix?: boolean; exclude_fields?: string; drop_tokens_threshold?: number; } /** * Translates the catalog plane's `SearchRequest` into a Typesense query. * Converts the filter expression tree, the audience-scoped query, and the * pagination shape. */ export declare function buildSearchQuery(request: SearchRequest, registry: FieldPolicyRegistry, slice?: IndexerSlice): TypesenseSearchQuery; /** * Returns the policy-owned default text fields for Typesense keyword search. * Hosted Typesense-compatible proxies can use this as their server-side * fallback when callers omit `query_by`, avoiding client-side schema scraping. */ export declare function buildDefaultTypesenseSearchFields(registry: FieldPolicyRegistry, slice?: IndexerSlice): string[]; export declare function buildDefaultTypesenseQueryBy(registry: FieldPolicyRegistry, slice?: IndexerSlice): string; export declare function typesenseTypeForField(name: string, isList: boolean): "string" | "string[]" | "int32" | "int64" | "float" | "bool" | "object" | "float[]"; export declare function isTypesenseSortableStringField(field: string): boolean; //# sourceMappingURL=typesense-search-query.d.ts.map