mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-30 18:35:00 -04:00 
			
		
		
		
	fix(server): search with same face multiple times (#7306)
This commit is contained in:
		
							parent
							
								
									d3e14fd662
								
							
						
					
					
						commit
						173b47033a
					
				| @ -213,9 +213,9 @@ export function searchAssetBuilder( | |||||||
|   if (personIds && personIds.length > 0) { |   if (personIds && personIds.length > 0) { | ||||||
|     builder |     builder | ||||||
|       .leftJoin(`${builder.alias}.faces`, 'faces') |       .leftJoin(`${builder.alias}.faces`, 'faces') | ||||||
|       .andWhere('faces.personId IN (:...personIds)', { personIds: personIds }) |       .andWhere('faces.personId IN (:...personIds)', { personIds }) | ||||||
|       .addGroupBy(`${builder.alias}.id`) |       .addGroupBy(`${builder.alias}.id`) | ||||||
|       .having('COUNT(faces.id) = :personCount', { personCount: personIds.length }); |       .having('COUNT(DISTINCT faces.personId) = :personCount', { personCount: personIds.length }); | ||||||
| 
 | 
 | ||||||
|     if (withExif) { |     if (withExif) { | ||||||
|       builder.addGroupBy('exifInfo.assetId'); |       builder.addGroupBy('exifInfo.assetId'); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user