/** * Query engine – evaluates MongoDB-style filter queries against documents. * * Supports: * - Comparison: $eq, $ne, $gt, $gte, $lt, $lte * - Set membership: $in, $nin * - Pattern: $regex * - Existence: $exists * - Array: $elemMatch, $size, $all * - Logical: $and, $or, $nor, $not * - Type: $type * - Text: $text / $search (full-text search across indexed fields) */ import type { FilterQuery } from '@digitaldefiance/suite-core-lib'; import type { BsonDocument } from '../interfaces/storage/documentTypes'; /** * Configure which fields are included in $text search. * Call this before running a filter that contains $text. */ export declare function setTextSearchFields(fields: string[]): void; /** * Get the currently configured text search fields. */ export declare function getTextSearchFields(): string[]; /** * Compare two values for ordering (like MongoDB's BSON comparison). * Returns negative if a < b, 0 if equal, positive if a > b. */ export declare function compareValues(a: unknown, b: unknown): number; /** * Deep equality check (handles primitives, arrays, plain objects, Dates). */ export declare function deepEquals(a: unknown, b: unknown): boolean; /** * Check if a document matches a filter query. */ export declare function matchesFilter(doc: T, filter: FilterQuery): boolean; /** * Apply projection to a document. */ export declare function applyProjection(doc: T, projection: Record): Partial; /** * Sort an array of documents by a sort specification. */ export declare function sortDocuments(docs: T[], sort: Record): T[]; /** * Tokenize a string into lowercase words (basic whitespace + punctuation split). */ export declare function tokenize(text: string): string[]; //# sourceMappingURL=queryEngine.d.ts.map