Add an opt-in option to lowercase filter values

Filter values that only differ in case, like `Mint` and `mint`, came
through as separate values. The new `--lowercase-filters` option
(`lowercase_filters`, `PAGEFIND_LOWERCASE_FILTERS`, and
`lowercaseFilters` / `lowercase_filters` in the Node and Python
wrappers) lowercases filter values when indexing and merges values on
a page that become equal. Filter names are left as they are. Off by
default.

Fixes #737
This commit is contained in:
dualfroz committed 2026-10-03 01:43:17 +02:00
1 parent 1308f3c1bb
commit 3a1d31147a
12 files changed
+176

No files matched your search

+4
View File
@@ -56,6 +56,10 @@ export interface PagefindServiceConfig {
* @example "<>$"
*/
includeCharacters?: string,
/**
* Lowercase filter values when indexing, so that values differing only in case are merged into one.
*/
lowercaseFilters?: boolean,
}
+1
View File
@@ -34,6 +34,7 @@ export interface InternalPagefindServiceConfig {
keep_index_url?: boolean,
write_playground?: boolean,
include_characters?: string,
lowercase_filters?: boolean,
}
export interface InternalAddFileRequest {