immich icon indicating copy to clipboard operation
immich copied to clipboard

Tags are not returned in the search/metadata or search/random endpoint.

Open giejay opened this issue 1 year ago • 0 comments

The bug

According to the docs, every asset should contain a "tags" field: https://immich.app/docs/api/search-assets

However, Im not getting back this field:

{
   "id":"72789f4f-e3b2-472e-aa10-423e53103121",
   "deviceAssetId":"PXL_20210116_120359944.jpg-2468654",
   "ownerId":"cd2583dd-3c1a-476f-9523-7dc8c3728ca2",
   "deviceId":"APM3LM97NL9K9D6",
   "libraryId":null,
   "type":"IMAGE",
   "originalPath":"upload/library/admin/xxx/PXL_20210116_120359944.jpg",
   "originalFileName":"PXL_20210116_120359944.jpg",
   "originalMimeType":"image/jpeg",
   "thumbhash":"XxgGDYKxh2zMd2lsePp3k7Z6wJYF",
   "fileCreatedAt":"2021-01-16T12:03:59.000Z",
   "fileModifiedAt":"2021-01-16T12:03:59.000Z",
   "localDateTime":"2021-01-16T12:03:59.000Z",
   "updatedAt":"2024-12-25T08:25:41.408Z",
   "isFavorite":false,
   "isArchived":false,
   "isTrashed":false,
   "duration":"0:00:00.00000",
   "livePhotoVideoId":null,
   "people":[
      
   ],
   "checksum":"ZCSeIlGWv8JacWtqbNaGtubG/vQ=",
   "isOffline":false,
   "hasMetadata":true,
   "duplicateId":null,
   "resized":true
}

Am I missing some "withTags" in the search request?

The OS that Immich Server is running on

Ubuntu

Version of Immich Server

1.26.1

Version of Immich Mobile App

not-using-it

Platform with the issue

  • [x] Server
  • [ ] Web
  • [ ] Mobile

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    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
      - /media/Backups/Photos:/media/Backups/Photos:ro
#      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    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

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    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

Your .env content

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

# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/Backups/Photos-Immich

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

Reproduction steps

  1. Use the API to search metadata
  2. Expect back the tags field
  3. Tags field not returned in result ...

Relevant log output


Additional information

No response

giejay avatar Feb 23 '25 10:02 giejay