/** @param {string} s @returns {string[]} */ export function tokenize(s: string): string[]; /** * Every searchable section of the docs, in the order the search ranks ties: each page, then the * spec and the workflow language, then the schema as one section (it is JSON, with no headings). * `source` numbers the body a section came from, in the same order. * @param {{ pages: { title: string, body: string }[], spec: { title: string, body: string }, lang: { title: string, body: string }, schema: { title: string, body: string } }} bundle * @returns {(Section & { source: number })[]} */ export function indexSections(bundle: { pages: { title: string; body: string; }[]; spec: { title: string; body: string; }; lang: { title: string; body: string; }; schema: { title: string; body: string; }; }): (Section & { source: number; })[]; /** * The search index of a docs bundle as one buffer: a length-prefixed JSON header (the release * version, headings, the sorted term list, counts, each source body's length) and then * little-endian unsigned 32-bit columns: per-section source, start, end and length, then per-term * posting offsets and, for every posting, the section and the boosted term frequency. A term's * postings run in section order. Every value is written and read explicitly little-endian, so the * bytes are the same on any host. * @param {Parameters[0] & { version: string }} bundle @returns {Buffer} */ export function encodeIndex(bundle: Parameters[0] & { version: string; }): Buffer; /** * The index as typed columns. `version` and `bodyLengths` are the release version and each source * body's length in the bundle being searched; an index built from another release or other bodies * throws instead of returning offsets into the wrong text. * @param {Buffer} bytes @param {number[]} bodyLengths @param {string} version */ export function decodeIndex(bytes: Buffer, bodyLengths: number[], version: string): { sections: number; terms: string[]; headings: string[]; source: Uint32Array; start: Uint32Array; end: Uint32Array; length: Uint32Array; offsets: Uint32Array; postSection: Uint32Array; postWeight: Uint32Array; avgdl: number; }; export const STOP: Set; /** * One searchable section. `start` and `end` locate its text in the source body, so the runtime * returns `body.slice(start, end)` instead of a second copy of the text. */ export type Section = { heading: string; start: number; end: number; tf: Map; len: number; }; //# sourceMappingURL=docs-index-core.d.ts.map