mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
fix(server): fix more vector search results being returned than intended (#3042)
This commit is contained in:
parent
455a36b0fc
commit
e477f99c7d
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user