Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ public void updateUserTravelTags(Long userId, UserTravelTagUpdateRequest request
}

// ✅ 저장 (새로 생성되었거나 업데이트된 경우)
profileAnswerRepository.save(profileAnswer);
ProfileAnswer savedProfileAnswer = profileAnswerRepository.save(profileAnswer);

createUserEmbeddingFromProfileAnswer(savedProfileAnswer);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public Map<Long, Double> calculateSimilaritiesForUsers(Long currentUserId, List<
Optional<UserEmbedding> currentUserEmbedding = userEmbeddingRepository.findByUserId(currentUserId);

if (currentUserEmbedding.isEmpty()) {
log.warn("현재 사용자 임베딩이 없어서 기본값 0.5 반환");
log.warn("✅✅✅현재 사용자 임베딩이 없어서 기본값 0.5 반환✅✅✅");
return targetUserIds.stream().collect(Collectors.toMap(id -> id, id -> 0.5));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ private <T> List<T> convertToDtoList(
// 유사도 계산
Map<Long, Double> similarityMap = calculateSimilaritiesForUsers(currentUserId, authorIds);

log.info("✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅");
log.info("✅✅✅ 유사도 계산 결과 (similarityMap): {} ✅✅✅", similarityMap);
log.info("✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅");

// similarity 내림차순 정렬
sortedPosts = travelPosts.stream()
.sorted((tp1, tp2) -> {
Expand Down