1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00
Self-hosted photo and video backup solution directly from your mobile phone.
Go to file
Sushain Cherivirala 7fc1954e2a
fix(server): add filename search (#6394)
Fixes https://github.com/immich-app/immich/issues/5982.

There are basically three options:

1. Search `originalFileName` by dropping a file extension from the query
(if present). Lower fidelity but very easy - just a standard index &
equality.
2. Search `originalPath` by adding an index on `reverse(originalPath)`
and using `starts_with(reverse(query) + "/", reverse(originalPath)`. A
weird index & query but high fidelity.
3. Add a new generated column called `originalFileNameWithExtension` or
something. More storage, kinda jank.

TBH, I think (1) is good enough and easy to make better in the future.
For example, if I search "DSC_4242.jpg", I don't really think it matters
if "DSC_4242.mov" also shows up.

edit: There's a fourth approach that we discussed a bit in Discord and
decided we could switch to it in the future: using a GIN. The minor
issue is that Postgres doesn't tokenize paths in a useful (they're a
single token and it won't match against partial components). We can
solve that by tokenizing it ourselves. For example:

```
immich=# with vecs as (select to_tsvector('simple', array_to_string(string_to_array('upload/library/sushain/2015/2015-08-09/IMG_275.JPG', '/'), ' ')) as vec)  select * from vecs where vec @@ phraseto_tsquery('simple', array_to_string(string_to_array('library/sushain', '/'), ' '));
                                      vec
-------------------------------------------------------------------------------
 '-08':6 '-09':7 '2015':4,5 'img_275.jpg':8 'library':2 'sushain':3 'upload':1
(1 row)
```

The query is also tokenized with the 'split-by-slash-join-with-space'
strategy. This strategy results in `IMG_275.JPG`, `2015`, `sushain` and
`library/sushain` matching. But, `08` and `IMG_275` do not match. The
former is because the token is `-08` and the latter because the
`img_275.jpg` token is matched against exactly.
2024-01-15 14:40:28 -06:00
.github refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
.vscode chore: microservices debugger (#2345) 2023-04-28 13:21:01 -05:00
cli refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
design chore: update screenshots for readme and docs (#2425) 2023-05-10 23:33:32 -05:00
docker refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
docs docs: fix pgadmin links (#6403) 2024-01-15 17:19:41 +00:00
fastlane Added required setup for f-droid (#88) 2022-03-29 14:13:47 -05:00
machine-learning fix(ml): remove unused import (#6356) 2024-01-13 00:25:26 -05:00
misc/release chore: update release note notes 2023-06-29 21:48:57 -05:00
mobile fix(deps): update dependency com.google.guava:guava to v33 (#5390) 2024-01-15 18:29:18 +00:00
open-api feat(server, web): quotas (#4471) 2024-01-12 19:43:36 -05:00
server fix(server): add filename search (#6394) 2024-01-15 14:40:28 -06:00
web chore(web): quota enhancement (#6371) 2024-01-15 09:04:29 -06:00
.dockerignore refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
.editorconfig chore: editorconfig (#1505) 2023-02-01 14:38:47 -06:00
.gitattributes refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
.gitignore refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
.gitmodules test(server): full backend end-to-end testing with microservices (#4225) 2023-10-06 23:32:28 +02:00
CODE_OF_CONDUCT.md Added Code of conduct 2022-08-21 12:43:56 -07:00
install.sh chore: Simplify install script (#2148) 2023-04-02 14:13:24 -05:00
LICENSE Update Readme 2022-02-11 22:35:14 -06:00
localizely.yml fix(mobile): Fix pt-PT locale. Add missing pt-PT localizely entry (#5892) 2023-12-20 09:46:20 -06:00
Makefile refactor: open api (#6334) 2024-01-12 07:36:27 -05:00
README_ca_ES.md Add German README (#5262) 2023-11-22 13:49:01 +01:00
README_de_DE.md docs(readme): correct wording and grammar in README_de_DE.md (#5447) 2023-12-02 13:44:28 +01:00
README_es_ES.md Add German README (#5262) 2023-11-22 13:49:01 +01:00
README_fr_FR.md Add German README (#5262) 2023-11-22 13:49:01 +01:00
README_it_IT.md Update README_it_IT.md (#5541) 2023-12-07 22:20:41 +00:00
README_ja_JP.md docs: fix README_ja_JP.md (#5939) 2023-12-23 09:20:04 -06:00
README_ko_KR.md Add German README (#5262) 2023-11-22 13:49:01 +01:00
README_nl_NL.md Update README_nl_NL.md (#5840) 2023-12-19 10:02:25 -06:00
README_ru_RU.md docs: Russian readme (#6221) 2024-01-06 20:02:50 +00:00
README_tr_TR.md Add German README (#5262) 2023-11-22 13:49:01 +01:00
README_zh_CN.md docs: update Chinese README (#6245) 2024-01-08 10:31:54 -06:00
README.md docs: Russian readme (#6221) 2024-01-06 20:02:50 +00:00
renovate.json deps: fix guava versioning (#6402) 2024-01-15 17:03:38 +00:00
SECURITY.md Create SECURITY.md (#712) 2022-09-17 13:07:12 -05:00


License: MIT Discord

Immich - High performance self-hosted photo and video backup solution



Català Español Français Italiano 日本語 한국어 Deutsch Nederlands Türkçe 中文 Русский

Disclaimer

  • ⚠️ The project is under very active development.
  • ⚠️ Expect bugs and breaking changes.
  • ⚠️ Do not use the app as the only way to store your photos and videos.
  • ⚠️ Always follow 3-2-1 backup plan for your precious photos and videos!

Content

Documentation

You can find the main documentation, including installation guides, at https://immich.app/.

Demo

You can access the web demo at https://demo.immich.app

For the mobile app, you can use https://demo.immich.app/api for the Server Endpoint URL

The credential
email: demo@immich.app
password: demo
Spec: Free-tier Oracle VM - Amsterdam - 2.4Ghz quad-core ARM64 CPU, 24GB RAM

Features

Features Mobile Web
Upload and view videos and photos Yes Yes
Auto backup when the app is opened Yes N/A
Selective album(s) for backup Yes N/A
Download photos and videos to local device Yes Yes
Multi-user support Yes Yes
Album and Shared albums Yes Yes
Scrubbable/draggable scrollbar Yes Yes
Support raw formats Yes Yes
Metadata view (EXIF, map) Yes Yes
Search by metadata, objects, faces, and CLIP Yes Yes
Administrative functions (user management) No Yes
Background backup Yes N/A
Virtual scroll Yes Yes
OAuth support Yes Yes
API Keys N/A Yes
LivePhoto/MotionPhoto backup and playback Yes Yes
User-defined storage structure Yes Yes
Public Sharing No Yes
Archive and Favorites Yes Yes
Global Map Yes Yes
Partner Sharing Yes Yes
Facial recognition and clustering Yes Yes
Memories (x years ago) Yes Yes
Offline support Yes No
Read-only gallery Yes Yes
Stacked Photos Yes Yes

Support the project

I've committed to this project, and I will not stop. I will keep updating the docs, adding new features, and fixing bugs. But I can't do it alone. So I need your help to give me additional motivation to keep going.

As our hosts in the selfhosted.show - In the episode 'The-organization-must-not-be-name is a Hostile Actor' said, this is a massive undertaking of what the team and I are doing. And I would love to someday be able to do this full-time, and I am asking for your help to make that happen.

If you feel like this is the right cause and the app is something you are seeing yourself using for a long time, please consider supporting the project with the option below.

Donation

  • Monthly donation via GitHub Sponsors
  • One-time donation via GitHub Sponsors
  • Liberapay
  • buymeacoffee
  • Bitcoin: 1FvEp6P6NM8EZEkpGUFAN2LqJ1gxusNxZX
  • ZCash: u1smm4wvqegcp46zss2jf5xptchgeczp4rx7a0wu3mermf2wxahm26yyz5w9mw3f2p4emwlljxjumg774kgs8rntt9yags0whnzane4n67z4c7gppq4yyvcj404ne3r769prwzd9j8ntvqp44fa6d67sf7rmcfjmds3gmeceff4u8e92rh38nd30cr96xw6vfhk6scu4ws90ldzupr3sz

Contributors