diff --git a/README.md b/README.md index 267c07f..7dcb184 100644 --- a/README.md +++ b/README.md @@ -264,7 +264,7 @@ Extern Projects & Plugins: - [Latin Charset Encoder Presets](doc/encoder.md) - [Language Specific Preset](doc/encoder.md) - [Custom Encoder](doc/encoder.md#custom-encoder) -- [Non-Blocking Runtime Balancer (Async)](doc/async.md) +- [Async Non-Blocking Runtime Balancer](doc/async.md) - [Worker Indexes](doc/worker.md) - [Worker Index Options](doc/worker.md#worker-index-options) - [Resolver (Complex Queries)](doc/resolver.md) @@ -286,10 +286,10 @@ Extern Projects & Plugins: - [Clickhouse](doc/persistent-clickhouse.md) - [Custom Score Function](doc/customization.md) - [Custom Builds](doc/custom-builds.md) -- [Extended Keystores (In-Memory)](doc/keystore.md) +- [Extended Keystores (In-Memory Index)](doc/keystore.md) - [Best Practices](#best-practices) - [Page-Load / Fast-Boot](#page-load--fast-boot) - - [Use numeric IDs](#use-numeric-ids) + - [Prefer numeric typed IDs](#use-numeric-ids) ## Load Library (Node.js, ESM, Legacy Browser) diff --git a/index.d.ts b/index.d.ts index d82a535..a1859b9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -382,7 +382,7 @@ declare module "flexsearch" { * * Document options: https://github.com/nextapps-de/flexsearch#document-options */ - type WorkerType = boolean | WorkerURL | WorkerPath + type WorkerType = boolean | WorkerURL | WorkerPath; type DocumentOptions< D extends DocumentData = DocumentData, @@ -415,6 +415,7 @@ declare module "flexsearch" { doc: D | null; field?: FieldName[]; tag?: FieldName[]; + highlight?: {[field: FieldName]: string}; }>; type DocumentSearchResults< @@ -451,10 +452,10 @@ declare module "flexsearch" { E extends boolean = false, M extends boolean = false > = SearchOptions & { - tag?: Object | Array; - field?: Array> | DocumentSearchOptions | string[] | string; - index?: Array> | DocumentSearchOptions | string[] | string; - pluck?: FieldName | DocumentSearchOptions; + tag?: {[field: FieldName]: string} | Array<{[field: FieldName]: string}>; + field?: Array> | DocumentSearchOptions | FieldName[] | FieldName; + index?: Array> | DocumentSearchOptions | FieldName[] | FieldName; + pluck?: FieldName | DocumentSearchOptions; highlight?: HighlightOptions | TemplateResultHighlighting; enrich?: E; merge?: M;