mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03:46:47 +01:00
fix(server): search for terms separated by hyphens and/or underscores in asset search (#4156)
* Use hyphen and underscore as token separators in search * Bump typesense asset schema version * Bump typesense asset schema version
This commit is contained in:
parent
1564ed3256
commit
91e2348381
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
import { CollectionCreateSchema } from 'typesense/lib/Typesense/Collections';
|
import { CollectionCreateSchema } from 'typesense/lib/Typesense/Collections';
|
||||||
|
|
||||||
export const assetSchemaVersion = 8;
|
export const assetSchemaVersion = 9;
|
||||||
export const assetSchema: CollectionCreateSchema = {
|
export const assetSchema: CollectionCreateSchema = {
|
||||||
name: `assets-v${assetSchemaVersion}`,
|
name: `assets-v${assetSchemaVersion}`,
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -35,7 +35,7 @@ export const assetSchema: CollectionCreateSchema = {
|
||||||
{ name: 'motion', type: 'bool', facet: true },
|
{ name: 'motion', type: 'bool', facet: true },
|
||||||
{ name: 'people', type: 'string[]', facet: true, optional: true },
|
{ name: 'people', type: 'string[]', facet: true, optional: true },
|
||||||
],
|
],
|
||||||
token_separators: ['.'],
|
token_separators: ['.', '-', '_'],
|
||||||
enable_nested_fields: true,
|
enable_nested_fields: true,
|
||||||
default_sorting_field: 'fileCreatedAt',
|
default_sorting_field: 'fileCreatedAt',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue