mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
fix(server): fix more vector search results being returned than intended (#3042)
This commit is contained in:
@@ -275,7 +275,7 @@ export class TypesenseRepository implements ISearchRepository {
|
|||||||
collection: faceSchema.name,
|
collection: faceSchema.name,
|
||||||
q: '*',
|
q: '*',
|
||||||
vector_query: `embedding:([${input.join(',')}], k:5)`,
|
vector_query: `embedding:([${input.join(',')}], k:5)`,
|
||||||
per_page: 250,
|
per_page: 5,
|
||||||
filter_by: this.buildFilterBy('ownerId', filters.ownerId, true),
|
filter_by: this.buildFilterBy('ownerId', filters.ownerId, true),
|
||||||
} as any,
|
} as any,
|
||||||
],
|
],
|
||||||
@@ -291,7 +291,7 @@ export class TypesenseRepository implements ISearchRepository {
|
|||||||
collection: assetSchema.name,
|
collection: assetSchema.name,
|
||||||
q: '*',
|
q: '*',
|
||||||
vector_query: `smartInfo.clipEmbedding:([${input.join(',')}], k:100)`,
|
vector_query: `smartInfo.clipEmbedding:([${input.join(',')}], k:100)`,
|
||||||
per_page: 250,
|
per_page: 100,
|
||||||
facet_by: this.getFacetFieldNames(SearchCollection.ASSETS),
|
facet_by: this.getFacetFieldNames(SearchCollection.ASSETS),
|
||||||
filter_by: this.getAssetFilters(filters),
|
filter_by: this.getAssetFilters(filters),
|
||||||
} as any,
|
} as any,
|
||||||
|
|||||||
Reference in New Issue
Block a user