fix(server): add more conditions to smart search (#5806)
* add more asset conditions * udpate sql
This commit is contained in:
@@ -56,6 +56,9 @@ export class SmartInfoRepository implements ISmartInfoRepository {
|
||||
.createQueryBuilder(AssetEntity, 'a')
|
||||
.innerJoin('a.smartSearch', 's')
|
||||
.where('a.ownerId = :ownerId')
|
||||
.andWhere('a.isVisible = true')
|
||||
.andWhere('a.isArchived = false')
|
||||
.andWhere('a.fileCreatedAt < NOW()')
|
||||
.leftJoinAndSelect('a.exifInfo', 'e')
|
||||
.orderBy('s.embedding <=> :embedding')
|
||||
.setParameters({ ownerId, embedding: asVector(embedding) })
|
||||
|
||||
Reference in New Issue
Block a user