feat(search): semantic image search with CLIP embeddings - #3315
Conversation
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.
|
superseded, reopened from the upstream repo |
Not up to standards ⛔🟢 Coverage
|
| Metric | Results |
|---|---|
| Coverage variation | Report missing for 121afae1 |
| Diff coverage | ✅ 45.28% diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (121afae) Report Missing Report Missing Report Missing Head commit (72257a7) 83397 19728 23.66% Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3315) 561 254 45.28% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
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 via a CLIP inference service (immich machine-learning API, multilingual model) and ranks image vectors by cosine similarity. Images are embedded at index time by aClipExtractordecorating the configured extractor. bleve searches via faiss KNN behind the newvectorsbuild tag (RRF fusion for hybrid queries; vectors round-trip through a stored-only sibling field because bleve cannot return vector-typed fields), OpenSearch viaknn_vectorplus client-side RRF. The filter part of a query keeps its regular meaning and stays the only source of totals; purely semantic queries return only the KNN ranking with raw similarity scores. The semantic clause is split off the parsed KQL tree (query.ExtractSemantic), so quoted values likename:"*semantic:x*"stay literals.Enable with
SEARCH_EXTRACTOR_CLIP_URLpointing at an immich-machine-learning instance (works withbasicandtika); bleve additionally needs a binary built withENABLE_VECTORS=true(see the faiss stage in Dockerfile.multiarch, pinned to the blevesearch/faiss commit matching the vendored go-faiss). Existing content needs a force reindex to get vectors.Open questions:
name:"*...*", needs a client change to issue semantic queriessemantic:in OR/NOT position degrades silently to an AND filter, could be rejected instead