feat(search): semantic image search with CLIP embeddings - #3316
Draft
dschmidt wants to merge 1 commit into
Draft
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 1 critical |
🟢 Metrics 200 complexity · -95 duplication
Metric Results Complexity 200 Duplication -95
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
semantic:"..." in KQL embeds the query text (immich-ml, multilingual CLIP) and ranks image vectors by cosine similarity: bleve via faiss KNN behind the new vectors build tag (RRF fusion, vector round-trip through a stored-only field), OpenSearch via knn_vector plus client-side RRF. The filter part of the query keeps its meaning and stays the only source of totals and facets.
dschmidt
changed the base branch from
tmp/refactor-search-mapping
to
refactor/search-mapping
August 18, 2026 17:30
dschmidt
force-pushed
the
feat/semantic-image-search
branch
from
August 18, 2026 17:30
72257a7 to
4afdbe3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Semantic image search:
semantic:"dog on a beach"finds images by content, no tags needed, any language the model covers.Indexing: a
ClipExtractordecorator (aroundbasic/tika) embeds images via a CLIP inference service (immich machine-learning API). Querying: the clause text is embedded into the same space and images are ranked by cosine similarity, bleve via faiss KNN behind the newvectorsbuild tag, OpenSearch viaknn_vector. The clause is split off the parsed KQL tree and composes with the rest of the query: the filter part scopes the neighbor search and owns the totals, hybrid rankings fuse via RRF, purely semantic queries return just the ranking. Vector size is index schema (512, startup probe hard-fails on mismatch); in bleve the raw vector lives in a stored-only sibling field so it survives move/delete/restore.Enable with
SEARCH_EXTRACTOR_CLIP_URL; bleve needs a build withENABLE_VECTORS=true(faiss stage in Dockerfile.multiarch); existing content needs a force reindex.Open: configurable dims/model, originals vs thumbnails to the service, capability flag for clients, web search bar wraps input as
name:"*...*", OR/NOT position degrades to AND, faiss release/CI story, immich-ml is AGPL (external unmodified service).