UNPKG

@am92/securities-utility

Version:
101 lines (100 loc) 2.69 kB
import { IWorkerConstantsOptions } from '../TYPES/SearchWorker'; /** * @ignore * * Worker chunk configuration for equity data processing * * Defines the range and index for processing equity data (1-25000) */ export declare const WORKER_CHUNK_ONE: { min: number; max: number; chunkIndex: number; }; /** * @ignore * * Worker chunk configuration for futures data processing * * Defines the range and index for processing futures data (25001-125000) */ export declare const WORKER_CHUNK_TWO: { min: number; max: number; chunkIndex: number; }; /** * @ignore * * Worker chunk configuration for options data processing * * Defines the range and index for processing options data (125001-150000) */ export declare const WORKER_CHUNK_THREE: { min: number; max: number; chunkIndex: number; }; /** * @ignore * * Worker chunk configuration for underlying data processing * * Defines the range and index for processing underlying data (150001-199999) */ export declare const WORKER_CHUNK_FOUR: { min: number; max: number; chunkIndex: number; }; /** * @ignore * * Collection of all worker chunk configurations * Array containing all worker chunk configurations for managing different data processing ranges */ export declare const WORKER_CHUNK_META: { min: number; max: number; chunkIndex: number; }[]; /** * @ignore * * Determines the appropriate chunk index based on priority value * @param {number | null} priority - The priority value to evaluate * @returns {number} The chunk index that corresponds to the priority range * Maps a priority value to its corresponding chunk index for worker assignment */ export declare function getChunkIndex(priority: number | null): number; /** * @ignore * * Maximum size limit for search chunks * Defines the maximum number of records that can be processed in a single search operation */ export declare const MAX_FUSE_CHUNK_SIZE = 20000; /** * @ignore * * Search configuration settings * Configuration object defining search behavior and result scoring * * @property {string[]} keys - Fields to search within * @property {number} limit - Maximum number of results to return * @property {number} threshold - Minimum score threshold for results * @property {Function} scoreFn - Custom scoring function for search results */ export declare const SEARCH_OPTIONS: { keys: string[]; limit: number; threshold: number; scoreFn: (a: any) => number; }; /** * @ignore * * Worker lifecycle command options * Defines the available commands for controlling worker lifecycle */ export declare const WORKER_CONSTANTS_OPTIONS: IWorkerConstantsOptions;