[BUG] Metadata search not working on v1.91.0 #1796

Closed
opened 2026-02-05 03:50:32 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @rvelasq on GitHub (Dec 16, 2023).

The bug

Searching for photos using the metadata search (m:your-search-term) does not produce any results

The OS that Immich Server is running on

Debian 6.1.66-1

Version of Immich Server

v1.91.0

Version of Immich Mobile App

v1.91.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - immich-machine-learning
      - immich-microservices
    restart: always
    ports:
      - 2283:3001

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.yml
      service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${UPLOAD_LOCATION}:/usr/src/app/upload

    env_file:
      - .env
    depends_on:
      - redis
      - database
      - immich-machine-learning
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - ./model-cache:/cache
    env_file:
      - .env
    restart: always
    ports:
      - 3003:3003


  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:60e49e22fa5706cd8df7d5e0bc50ee9bab7c608039fa653c4d961014237cca46
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    restart: always
    labels:
      - "diun.enable=true"

Your .env content

TZ=Redacted
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
UPLOAD_LOCATION=/mnt/v1/photos/immich-library
TYPESENSE_API_KEY=some-random-characters
TYPESENSE_HOST=typesense
PUBLIC_LOGIN_PAGE_MESSAGE=
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Reproduction steps

1. Search for something using the `m:your-search-term` format
2. It will always say No Results

Additional information

No response

Originally created by @rvelasq on GitHub (Dec 16, 2023). ### The bug Searching for photos using the metadata search (`m:your-search-term`) does not produce any results ### The OS that Immich Server is running on Debian 6.1.66-1 ### Version of Immich Server v1.91.0 ### Version of Immich Mobile App v1.91.0 ### Platform with the issue - [ ] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - /etc/localtime:/etc/localtime:ro - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - immich-machine-learning - immich-microservices restart: always ports: - 2283:3001 immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} extends: file: hwaccel.yml service: hwaccel command: [ "start.sh", "microservices" ] volumes: - /etc/localtime:/etc/localtime:ro - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - immich-machine-learning restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - ./model-cache:/cache env_file: - .env restart: always ports: - 3003:3003 redis: container_name: immich_redis image: redis:6.2-alpine@sha256:60e49e22fa5706cd8df7d5e0bc50ee9bab7c608039fa653c4d961014237cca46 restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - ./pgdata:/var/lib/postgresql/data restart: always labels: - "diun.enable=true" ``` ### Your .env content ```Shell TZ=Redacted DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis UPLOAD_LOCATION=/mnt/v1/photos/immich-library TYPESENSE_API_KEY=some-random-characters TYPESENSE_HOST=typesense PUBLIC_LOGIN_PAGE_MESSAGE= IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 ``` ### Reproduction steps ```bash 1. Search for something using the `m:your-search-term` format 2. It will always say No Results ``` ### Additional information _No response_
Author
Owner

@jkumeboshi commented on GitHub (Dec 16, 2023):

also searching for places, such as "/search?exifInfo.city=Paris" generates Failed to search (500 - Internal Server Error)

In logs:

immich_server              | [Nest] 8  - 12/16/2023, 12:39:50 PM   ERROR [ErrorInterceptor] Failed to search
immich_server              | [Nest] 8  - 12/16/2023, 12:39:50 PM   ERROR [ErrorInterceptor] Error: Missing query

CLIP searches print in LOG always a series of following warns:

immich_server              | [Nest] 8  - 12/16/2023, 12:43:01 PM    WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses

Search with "clip=false" returns empty values except if you search for place names: /search?q=Paris&clip=false

@jkumeboshi commented on GitHub (Dec 16, 2023): also searching for places, such as "/search?exifInfo.city=Paris" generates ```Failed to search (500 - Internal Server Error)``` In logs: ``` immich_server | [Nest] 8 - 12/16/2023, 12:39:50 PM ERROR [ErrorInterceptor] Failed to search immich_server | [Nest] 8 - 12/16/2023, 12:39:50 PM ERROR [ErrorInterceptor] Error: Missing query ``` CLIP searches print in LOG always a series of following warns: ``` immich_server | [Nest] 8 - 12/16/2023, 12:43:01 PM WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses ``` Search with "clip=false" returns empty values except if you search for place names: `/search?q=Paris&clip=false `
Author
Owner

@Arbide commented on GitHub (Dec 16, 2023):

Same problem here searching for places.

[Nest] 7  - 12/16/2023, 12:56:59 PM   ERROR [ErrorInterceptor] Failed to search
[Nest] 7  - 12/16/2023, 12:56:59 PM   ERROR [ErrorInterceptor] Error: Missing query
@Arbide commented on GitHub (Dec 16, 2023): Same problem here searching for places. ``` [Nest] 7 - 12/16/2023, 12:56:59 PM ERROR [ErrorInterceptor] Failed to search [Nest] 7 - 12/16/2023, 12:56:59 PM ERROR [ErrorInterceptor] Error: Missing query ```
Author
Owner

@mertalev commented on GitHub (Dec 16, 2023):

Searching by place is now fixed with #5746. We have e2e tests for metadata search so need to investigate why they pass when it isn't working for some users.

@mertalev commented on GitHub (Dec 16, 2023): Searching by place is now fixed with #5746. We have e2e tests for metadata search so need to investigate why they pass when it isn't working for some users.
Author
Owner

@mertalev commented on GitHub (Dec 16, 2023):

I haven't been able to reproduce this issue so far. I created a new instance at v1.90.2, uploaded a number of assets, brought down the stack and started with v1.91.0. m: search works both before and after the upgrade. I also tried disabling the Tag Images job before uploading assets to see if it could be related, but this also had the same result.

Are there any errors in the logs when doing m: search?

The two relevant columns here are exifTextSearchableColumn in immich.public.exif and smartInfoTextSearchableColumn in immich.public.smart_info. Can you confirm that these columns have the indexed metadata?

@mertalev commented on GitHub (Dec 16, 2023): I haven't been able to reproduce this issue so far. I created a new instance at v1.90.2, uploaded a number of assets, brought down the stack and started with v1.91.0. `m:` search works both before and after the upgrade. I also tried disabling the Tag Images job before uploading assets to see if it could be related, but this also had the same result. Are there any errors in the logs when doing `m:` search? The two relevant columns here are `exifTextSearchableColumn` in `immich.public.exif` and `smartInfoTextSearchableColumn` in `immich.public.smart_info`. Can you confirm that these columns have the indexed metadata?
Author
Owner

@agross commented on GitHub (Dec 17, 2023):

The same "missing query" error is logged on the server if I tap Explore / Categories / Videos or Motion Photos on the mobile app.

@agross commented on GitHub (Dec 17, 2023): The same "missing query" error is logged on the server if I tap Explore / Categories / Videos or Motion Photos on the mobile app.
Author
Owner

@raisinbear commented on GitHub (Dec 17, 2023):

Same here. I'm on 1.91.2 currently and the only thing that has changed for me since #5746 is that I don't see an error anymore, but metadata search does not produce any results. Neither does clicking a "Place". All I get is this:

grafik

This used to work perfectly before. exifTextSearchableColumn is populated, however smartInfoTextSearchableColumn is not. But probably never was, because I have tagging and CLIP disabled and had so always before. But this didn't prevent me from using metadata search or be able to filter by places.

@raisinbear commented on GitHub (Dec 17, 2023): Same here. I'm on `1.91.2` currently and the only thing that has changed for me since #5746 is that I don't see an error anymore, but metadata search does not produce any results. Neither does clicking a "Place". All I get is this: ![grafik](https://github.com/immich-app/immich/assets/68740188/39027ee3-519e-4692-ac34-155e22b66754) This used to work perfectly before. `exifTextSearchableColumn` is populated, however `smartInfoTextSearchableColumn` is not. But probably never was, because I have tagging and CLIP disabled and had so always before. But this didn't prevent me from using metadata search or be able to filter by places.
Author
Owner

@Vyerni commented on GitHub (Dec 17, 2023):

I get the same, "no results" page. I even tested on the demo site, by putting a tag into a picture and trying to m:tag and still got no results

@Vyerni commented on GitHub (Dec 17, 2023): I get the same, "no results" page. I even tested on the demo site, by putting a tag into a picture and trying to `m:tag` and still got no results
Author
Owner

@mertalev commented on GitHub (Dec 17, 2023):

I think we found the issue. It's because the new search does an inner join on smart_info. This still works if you have Tag Objects disabled, but not if you have ML disabled altogether.

@mertalev commented on GitHub (Dec 17, 2023): I think we found the issue. It's because the new search does an inner join on `smart_info`. This still works if you have Tag Objects disabled, but not if you have ML disabled altogether.
Author
Owner

@raisinbear commented on GitHub (Dec 17, 2023):

I think we found the issue. It's because the new search does an inner join on smart_info. This still works if you have Tag Objects disabled, but not if you have ML disabled altogether.

Cool! Do you think that is something that can be resolved without turning on Smart Search (CLIP) or is enabling this the way from now on? Just fyi, machine learning is not completely disabled in my case - face recognition is running, but of course that has nothing to do with smart_info..

@raisinbear commented on GitHub (Dec 17, 2023): > I think we found the issue. It's because the new search does an inner join on `smart_info`. This still works if you have Tag Objects disabled, but not if you have ML disabled altogether. Cool! Do you think that is something that can be resolved without turning on Smart Search (CLIP) or is enabling this the way from now on? Just fyi, machine learning is not completely disabled in my case - face recognition is running, but of course that has nothing to do with smart_info..
Author
Owner

@mertalev commented on GitHub (Dec 17, 2023):

No need to enable ML; I'm going to make a PR to fix the query.

@mertalev commented on GitHub (Dec 17, 2023): No need to enable ML; I'm going to make a PR to fix the query.
Author
Owner

@jkumeboshi commented on GitHub (Dec 19, 2023):

There is a last thing missing form 1.90:

Searching for photos using the metadata search does not search anymore on file name (m:filename).
Maybe this is a wanted behavior, but since I rename all my photos to include a short description, it was a really useful feature for me to search by file name.

@jkumeboshi commented on GitHub (Dec 19, 2023): There is a last thing missing form 1.90: Searching for photos using the metadata search does not search anymore on file name `(m:filename)`. Maybe this is a wanted behavior, but since I rename all my photos to include a short description, it was a really useful feature for me to search by file name.
Author
Owner

@Vyerni commented on GitHub (Dec 20, 2023):

There is a last thing missing form 1.90:

Searching for photos using the metadata search does not search anymore on file name (m:filename). Maybe this is a wanted behavior, but since I rename all my photos to include a short description, it was a really useful feature for me to search by file name.

Still the same thing with photo tags/description

@Vyerni commented on GitHub (Dec 20, 2023): > There is a last thing missing form 1.90: > > Searching for photos using the metadata search does not search anymore on file name `(m:filename)`. Maybe this is a wanted behavior, but since I rename all my photos to include a short description, it was a really useful feature for me to search by file name. Still the same thing with photo tags/description
Author
Owner

@ghost commented on GitHub (Jan 5, 2024):

I have the same issue on v1.91.4. The same "missing query" error is logged on the server if I tap Explore / Categories / Videos or Motion Photos on the Android app.

[Nest] 8 - 01/05/2024, 10:20:52 AM ERROR [Error: Missing query
at SearchService.search (/usr/src/app/dist/domain/search/search.service.js:53:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)] Failed to search
[Nest] 8 - 01/05/2024, 10:20:52 AM ERROR [Error: Missing query
at SearchService.search (/usr/src/app/dist/domain/search/search.service.js:53:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)] Error: Missing query
[Nest] 8 - 01/05/2024, 10:20:54 AM ERROR [Error: Missing query

@ghost commented on GitHub (Jan 5, 2024): I have the same issue on v1.91.4. The same "missing query" error is logged on the server if I tap Explore / Categories / Videos or Motion Photos on the Android app. [Nest] 8 - 01/05/2024, 10:20:52 AM ERROR [Error: Missing query at SearchService.search (/usr/src/app/dist/domain/search/search.service.js:53:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)] Failed to search [Nest] 8 - 01/05/2024, 10:20:52 AM ERROR [Error: Missing query at SearchService.search (/usr/src/app/dist/domain/search/search.service.js:53:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)] Error: Missing query [Nest] 8 - 01/05/2024, 10:20:54 AM ERROR [Error: Missing query
Author
Owner

@kamzil commented on GitHub (Feb 13, 2024):

Filename search is not working for me either on 1.94.1 Android. Is https://github.com/immich-app/immich/issues/5883#issuecomment-1930700369 why this ticket remains closed?

@kamzil commented on GitHub (Feb 13, 2024): Filename search is not working for me either on 1.94.1 Android. Is https://github.com/immich-app/immich/issues/5883#issuecomment-1930700369 why this ticket remains closed?
Author
Owner

@mertalev commented on GitHub (Feb 13, 2024):

This issue is specific to a particular bug that has been fixed. The comment you linked is also right that any issue made about search right now will soon be outdated.

@mertalev commented on GitHub (Feb 13, 2024): This issue is specific to a particular bug that has been fixed. The comment you linked is also right that any issue made about search right now will soon be outdated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1796