mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 22:53:08 +08:00
feat: add unaccent support for accent-insensitive search (#1402)
- Add PostgreSQL unaccent and pg_trgm extensions - Create immutable f_unaccent wrapper function for performance - Update all search queries to use f_unaccent for accent-insensitive matching - Add 1MB limit to tsvector content to prevent errors on large documents - Update full-text search trigger to use f_unaccent - Fix MultiSelect client-side filtering to show server results properly
This commit is contained in:
@@ -76,6 +76,10 @@ export function sanitizeFileName(fileName: string): string {
|
||||
return sanitizedFilename.slice(0, 255);
|
||||
}
|
||||
|
||||
export function removeAccent(str: string): string {
|
||||
if (!str) return str;
|
||||
return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
||||
|
||||
export function extractBearerTokenFromHeader(
|
||||
request: FastifyRequest,
|
||||
): string | undefined {
|
||||
|
||||
Reference in New Issue
Block a user