mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): search by filename (#7624)
* Toggle to search by filename * wild card search and pr feedback * Pr feedback * naming * placeholder * Create index * pr feedback * pr feedback * Update web/src/lib/components/shared-components/search-bar/search-text-section.svelte Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * pr feedback * pr feedback * pr feedback * pr feedback --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
ae46188753
commit
2f53f6a62c
6 changed files with 86 additions and 15 deletions
|
|
@ -160,9 +160,15 @@ export function searchAssetBuilder(
|
|||
builder.andWhere(`${builder.alias}.ownerId IN (:...userIds)`, { userIds: options.userIds });
|
||||
}
|
||||
|
||||
const path = _.pick(options, ['encodedVideoPath', 'originalFileName', 'originalPath', 'resizePath', 'webpPath']);
|
||||
const path = _.pick(options, ['encodedVideoPath', 'originalFileName', 'resizePath', 'webpPath']);
|
||||
builder.andWhere(_.omitBy(path, _.isUndefined));
|
||||
|
||||
if (options.originalPath) {
|
||||
builder.andWhere(`f_unaccent(${builder.alias}.originalPath) ILIKE f_unaccent(:originalPath)`, {
|
||||
originalPath: `%${options.originalPath}%`,
|
||||
});
|
||||
}
|
||||
|
||||
const status = _.pick(options, ['isExternal', 'isFavorite', 'isOffline', 'isReadOnly', 'isVisible', 'type']);
|
||||
const {
|
||||
isArchived,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue