Added imageName as searchable text on database

This commit is contained in:
Alex Tran 2022-07-26 13:43:12 -05:00
parent 83cbf51704
commit e4c4b53fcd
No known key found for this signature in database
GPG key ID: E4954BC787B85C8A
2 changed files with 54 additions and 3 deletions

View file

@ -74,7 +74,7 @@ export class ExifEntity {
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
asset?: ExifEntity;
@Index("exif_text_searchable", { synchronize: false })
@Index('exif_text_searchable', { synchronize: false })
@Column({
type: 'tsvector',
generatedType: 'STORED',
@ -83,9 +83,10 @@ export class ExifEntity {
COALESCE(model, '') || ' ' ||
COALESCE(orientation, '') || ' ' ||
COALESCE("lensModel", '') || ' ' ||
COALESCE("imageName", '') || ' ' ||
COALESCE("city", '') || ' ' ||
COALESCE("state", '') || ' ' ||
COALESCE("country", ''))`
COALESCE("country", ''))`,
})
exifTextSearchableColumn!: string
exifTextSearchableColumn!: string;
}