diff --git a/src/domain/match/match.service.ts b/src/domain/match/match.service.ts index f00c4d3..8633cca 100644 --- a/src/domain/match/match.service.ts +++ b/src/domain/match/match.service.ts @@ -49,7 +49,7 @@ export class MatchService { results.map(async (item) => { try { const percent = item.similarity_score > 1 ? item.similarity_score : item.similarity_score * 100; - const status = percent >= 90 ? MatchingStatus.FOUND : MatchingStatus.NOT_FOUND; + const status = percent >= 85 ? MatchingStatus.FOUND : MatchingStatus.NOT_FOUND; const feed = await this.feedRepository.findOne({ where: { id: item.feed_id }, relations: ['author'] }); if (!feed) throw new CommonException(ErrorCode.NOT_FOUND_FEED); @@ -71,7 +71,7 @@ export class MatchService { similarity: percent, saved: true, message: - percent >= 90 + percent >= 85 ? `잃어버린 동물을 제보해주셨어요! 유사도 ${Math.round(percent)}%!` : undefined, }; @@ -81,7 +81,7 @@ export class MatchService { }) ); - // 90% 이상만 응답 + // 85% 이상만 응답 return allResults.filter( (item): item is { feed_id: number; @@ -90,7 +90,7 @@ export class MatchService { similarity: number; saved: boolean; message: string; - } => !!item && item.saved && typeof item.similarity === 'number' && item.similarity >= 90 + } => !!item && item.saved && typeof item.similarity === 'number' && item.similarity >= 85 ); } @@ -116,7 +116,7 @@ export class MatchService { const matchingResults = await this.matchingResultRepository.find({ where: { feed: { id: In(feedIds) }, - similarity: MoreThanOrEqual(90), + similarity: MoreThanOrEqual(85), }, relations: ['user', 'feed'], });