[BUG] Select face search not working consistently #1747

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

Originally created by @eygraber on GitHub (Dec 8, 2023).

The bug

There are times where I search for a person on Select face, but no results are returned. Searching in the browser (ctl+f) does find the person though.

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.90.2

Version of Immich Mobile App

v1.90.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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

  immich-microservices:
    user: 1000:1001
    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:
      - /disks/storage/immich/volumes/geocoding:/usr/src/app/.reverse-geocoding-dump
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    user: 1000:1001
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - /disks/storage/immich/volumes/model-cache:/cache
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - /disks/storage/immich/volumes/tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    user: 1000:1001
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /disks/storage/immich/volumes/pgdata:/var/lib/postgresql/data
    restart: always

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

PUID=1000
GUID=1001

# The location where your uploaded files are stored
UPLOAD_LOCATION=/disks/storage/immich/library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=...
DB_PASSWORD=...

TZ=America/New_York

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Open a photo
2. Edit face
3. Search on select face

Additional information

This was happening on 1.90.0 as well.

Originally created by @eygraber on GitHub (Dec 8, 2023). ### The bug There are times where I search for a person on Select face, but no results are returned. Searching in the browser (ctl+f) does find the person though. ### The OS that Immich Server is running on Ubuntu 22.04 ### Version of Immich Server v1.90.2 ### Version of Immich Mobile App v1.90.2 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: user: 1000:1001 container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env ports: - "2283:3001" depends_on: - redis - database - typesense restart: always immich-microservices: user: 1000:1001 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: - /disks/storage/immich/volumes/geocoding:/usr/src/app/.reverse-geocoding-dump - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - typesense restart: always immich-machine-learning: user: 1000:1001 container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /disks/storage/immich/volumes/model-cache:/cache env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - /disks/storage/immich/volumes/tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: user: 1000:1001 container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - /disks/storage/immich/volumes/pgdata:/var/lib/postgresql/data restart: always ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables PUID=1000 GUID=1001 # The location where your uploaded files are stored UPLOAD_LOCATION=/disks/storage/immich/library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=... DB_PASSWORD=... TZ=America/New_York # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Open a photo 2. Edit face 3. Search on select face ``` ### Additional information This was happening on 1.90.0 as well.
Author
Owner

@martabal commented on GitHub (Dec 9, 2023):

Can you precise what works and what does not ?

@martabal commented on GitHub (Dec 9, 2023): Can you precise what works and what does not ?
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

There are times where I search for a person on Select face, but no results are returned

Literally this. I type a name into the search bar for a person that for sure exists, but there are no results returned.

I've noticed that it seems to happen for people that I've recently merged into, but haven't been able to repro consistently.

@eygraber commented on GitHub (Dec 10, 2023): > There are times where I search for a person on Select face, but no results are returned Literally this. I type a name into the search bar for a person that for sure exists, but there are no results returned. I've noticed that it seems to happen for people that I've recently merged into, but haven't been able to repro consistently.
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Oh you're speaking about the search bar, then what's the Select face you mentioned ?

@martabal commented on GitHub (Dec 10, 2023): Oh you're speaking about the search bar, then what's the Select face you mentioned ?
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

The search bar on the Select face window. I don't know what you actually call it, but that's the text on the window that opens when reassigning a face.

Side note, it would be easier to report bugs like this if there was some way to blur all photos, thumbnails, etc... That way I could screen record or screenshot without worrying about publicizing private information.

@eygraber commented on GitHub (Dec 10, 2023): The search bar on the Select face window. I don't know what you actually call it, but that's the text on the window that opens when reassigning a face. Side note, it would be easier to report bugs like this if there was some way to blur all photos, thumbnails, etc... That way I could screen record or screenshot without worrying about publicizing private information.
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Oh right, I see. I just call it "the modal to search people when re-assigning faces" ahah. With my testings, I have the same results as the other search modals (with the merge face selector and people suggestion when typing a name).

Note that the person with the face you are re-assigning won't appear in the results : it does not make sense to suggest to re-assign a face to person A if the face is already assigned to person A.

@martabal commented on GitHub (Dec 10, 2023): Oh right, I see. I just call it "the modal to search people when re-assigning faces" ahah. With my testings, I have the same results as the other search modals (with the merge face selector and people suggestion when typing a name). Note that the person with the face you are re-assigning won't appear in the results : it does not make sense to suggest to re-assign a face to person A if the face is already assigned to person A.
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Side note, it would be easier to report bugs like this if there was some way to blur all photos, thumbnails, etc... That way I could screen record or screenshot without worrying about publicizing private information.

I agree, but it's hard to implement many features without having users confused with so many options. In general, every FR can be technically implemented but that would definitely impact the UI/UX. IMO, Immich should have an advanced section in the user settings for this kind of things.

@martabal commented on GitHub (Dec 10, 2023): > Side note, it would be easier to report bugs like this if there was some way to blur all photos, thumbnails, etc... That way I could screen record or screenshot without worrying about publicizing private information. I agree, but it's hard to implement many features without having users confused with so many options. In general, every FR can be technically implemented but that would definitely impact the UI/UX. IMO, Immich should have an advanced section in the user settings for this kind of things.
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

Note that the person with the face you are re-assigning won't appear in the results

Right, that makes sense. This is for a different person.

Immich should have an advanced section in the user settings for this kind of things.

Yes, I was envisioning something like that.

@eygraber commented on GitHub (Dec 10, 2023): > Note that the person with the face you are re-assigning won't appear in the results Right, that makes sense. This is for a different person. > Immich should have an advanced section in the user settings for this kind of things. Yes, I was envisioning something like that.
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Is the person hidden ?
Do you experience the same behavior when searching for people on other modals (on the merge face selector or on people suggestion when typing a name on the person's page)

@martabal commented on GitHub (Dec 10, 2023): Is the person hidden ? Do you experience the same behavior when searching for people on other modals (on the merge face selector or on people suggestion when typing a name on the person's page)
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

The person isn't hidden. I'm not able to repro consistently, but once I figure out how to, I'll try those searches as well.

@eygraber commented on GitHub (Dec 10, 2023): The person isn't hidden. I'm not able to repro consistently, but once I figure out how to, I'll try those searches as well.
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

The original person I had this issue with still seems to have the issue so I can test with them, but I still don't have a repro:

merge face selector

The person shows up here when typing their name

people suggestion when typing a name on the person's page

The person is suggested when typing their name

@eygraber commented on GitHub (Dec 10, 2023): The original person I had this issue with still seems to have the issue so I can test with them, but I still don't have a repro: > merge face selector The person shows up here when typing their name > people suggestion when typing a name on the person's page The person is suggested when typing their name
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

I think this is happening if the person is created when reassigning

@eygraber commented on GitHub (Dec 10, 2023): I think this is happening if the person is created when reassigning
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

Maybe more complicated than that 🤔

I have a person that was created a few months ago. Typing the first name doesn't result in anything, but the last name does. So if I have 3 people, Foo One, Foo Two, and Foo Three:

  1. Typing Foo returns Foo Two and Foo Three
  2. Typing Foo One returns nothing
  3. Typing One returns Foo One
@eygraber commented on GitHub (Dec 10, 2023): Maybe more complicated than that :thinking: I have a person that was created a few months ago. Typing the first name doesn't result in anything, but the last name does. So if I have 3 people, Foo One, Foo Two, and Foo Three: 1. Typing Foo returns Foo Two and Foo Three 2. Typing Foo One returns nothing 3. Typing One returns Foo One
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Do you have more than 20 people with a name starting with "Foo" ?

@martabal commented on GitHub (Dec 10, 2023): Do you have more than 20 people with a name starting with "Foo" ?
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

Nope

@eygraber commented on GitHub (Dec 10, 2023): Nope
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

Well (sorry to be confusing) I found another person that doesn't show up in the search in Select face when I type their first or second name. They don't show up if I type their last name either, but I have more than 20 people with that last name.

@eygraber commented on GitHub (Dec 10, 2023): Well (sorry to be confusing) I found another person that doesn't show up in the search in Select face when I type their first or second name. They don't show up if I type their last name either, but I have more than 20 people with that last name.
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

There's a know limitation currently : if you try to search a person called "john doe oliver", typing "john d" will show "john doe oliver" but typing "doe o" won't show him

@martabal commented on GitHub (Dec 10, 2023): There's a know limitation currently : if you try to search a person called "john doe oliver", typing "john d" will show "john doe oliver" but typing "doe o" won't show him
Author
Owner

@eygraber commented on GitHub (Dec 10, 2023):

Right, but in my case typing "john d" doesn't show anything.

So to summarize what I've found so far with the select face search:

  1. Most searches work fine
  2. Some searches don't return any results for the first or second name but do return results for the last name
  3. Some searches don't return any results for first, second, or last name
  4. The people that don't work range from having been created very recently, to those created a few months ago
@eygraber commented on GitHub (Dec 10, 2023): Right, but in my case typing "john d" doesn't show anything. So to summarize what I've found so far with the select face search: 1. Most searches work fine 2. Some searches don't return any results for the first or second name but do return results for the last name 3. Some searches don't return any results for first, second, or last name 4. The people that don't work range from having been created very recently, to those created a few months ago
Author
Owner

@martabal commented on GitHub (Dec 10, 2023):

Interesting, I might have solved this issue with #5511

@martabal commented on GitHub (Dec 10, 2023): Interesting, I might have solved this issue with #5511
Author
Owner

@chodthewacko commented on GitHub (Apr 24, 2024):

I think I know what the problem is.

This is referring explicitly to:
people -> edit people -> "-" (to reassign the face) -> magnifying glass

There is a cap of 19 people for any search.
On the main page, it always searches the full list of names.
On the 'magnifying glass' search, where you are replacing names, it is apparently only searching the current subset of faces.

More explicit example:
Assume you have 1000 names in your database.
Let's assume 100 of those people start with 'a',
and 20 of those people start with 'ab', roughly 1/5 of the 'a's.

On the main people page (explore -> view all (people) -> "search people" box:
when you type 'a', it shows you 19 people (searched from the 1000)
If you then type 'b', thus searching for 'ab', it shows you 19 people (searched from the 1000)

On the reassign page, it's only searching the current subset of faces.
when you type 'a', it shows 19 people (searched from the 1000)
if you then type 'b', thus searching for 'ab', it is only showing 4 people (searched from the 19 remaining faces)

This is on server/web version v1.100.0

@chodthewacko commented on GitHub (Apr 24, 2024): I think I know what the problem is. This is referring explicitly to: people -> edit people -> "-" (to reassign the face) -> magnifying glass There is a cap of 19 people for any search. On the main page, it always searches the full list of names. On the 'magnifying glass' search, where you are replacing names, it is apparently only searching the current subset of faces. More explicit example: Assume you have 1000 names in your database. Let's assume 100 of those people start with 'a', and 20 of those people start with 'ab', roughly 1/5 of the 'a's. On the main people page (explore -> view all (people) -> "search people" box: when you type 'a', it shows you 19 people (searched from the 1000) If you then type 'b', thus searching for 'ab', it shows you 19 people (searched from the 1000) On the reassign page, it's only searching the current subset of faces. when you type 'a', it shows 19 people (searched from the 1000) if you then type 'b', thus searching for 'ab', it is only showing 4 people (searched from the 19 remaining faces) This is on server/web version v1.100.0
Author
Owner

@martabal commented on GitHub (Apr 24, 2024):

For now, this is how it's supposed to work #8822

@martabal commented on GitHub (Apr 24, 2024): For now, this is how it's supposed to work #8822
Author
Owner

@chodthewacko commented on GitHub (Apr 24, 2024):

For now, this is how it's supposed to work #8822

That's not the same issue.
I understand you limit the result count to 19 maximum matches.

The way you have it working, you can easily get zero matches.
If you have 20 people whose name starts with the letter 'f', any new people you add can not be found if their name starts
with the letter 'f'.

@chodthewacko commented on GitHub (Apr 24, 2024): > For now, this is how it's supposed to work #8822 That's not the same issue. I understand you limit the result count to 19 maximum matches. The way you have it working, you can easily get zero matches. If you have 20 people whose name starts with the letter 'f', any new people you add can not be found if their name starts with the letter 'f'.
Author
Owner

@eygraber commented on GitHub (Apr 25, 2024):

On the reassign page, it's only searching the current subset of faces.
when you type 'a', it shows 19 people (searched from the 1000)
if you then type 'b', thus searching for 'ab', it is only showing 4 people (searched from the 19 remaining faces)

That repros the issue for me. Thanks for finding that!

@martabal this is definitely an issue, and one of the more frustrating ones I've been dealing with.

@eygraber commented on GitHub (Apr 25, 2024): > On the reassign page, it's only searching the current subset of faces. when you type 'a', it shows 19 people (searched from the 1000) if you then type 'b', thus searching for 'ab', it is only showing 4 people (searched from the 19 remaining faces) That repros the issue for me. Thanks for finding that! @martabal this is definitely an issue, and one of the more frustrating ones I've been dealing with.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1747