Skip to content

search_query 정렬 시 페이지 간 중복 id 수정#512

Merged
eastshine2741 merged 1 commit into
developfrom
eastshine2741/fix-duplicate-search-query
May 9, 2026
Merged

search_query 정렬 시 페이지 간 중복 id 수정#512
eastshine2741 merged 1 commit into
developfrom
eastshine2741/fix-duplicate-search-query

Conversation

@eastshine2741

Copy link
Copy Markdown
Contributor

Summary

  • COUNT_DESC(강의평 많은 순), RATING_DESC(평점 높은 순) 정렬 시 evInfo.count / evInfo.avgRating 단일 키만으로 정렬되어, 동일 값 lecture들이 페이지 경계에서 임의 순서로 섞여 인접 페이지 간 같은 id가 중복 노출되던 문제 수정
  • Lecture::id.asc()를 secondary sort로 추가하여 결정적(deterministic) 정렬 보장 (_id는 unique + indexed라 비용 거의 없음)

Test plan

  • ./gradlew :core:compileKotlin 통과 (확인 완료)
  • 로컬 dev에서 POST /v1/search_query 를 sortCriteria=강의평 많은 순으로 page=0..N 순회 → 누적 id 집합에 중복 0 확인
  • 동일하게 평점 높은 순 도 중복 0 확인
  • 기본값 정렬은 동작/순서 변화 없음 sanity check
  • 같은 쿼리/페이지 두 번 호출 시 응답 순서 동일한지(결정성) 확인

🤖 Generated with Claude Code

@eastshine2741 eastshine2741 requested review from a team and PFCJeong as code owners May 9, 2026 06:53
@eastshine2741 eastshine2741 requested review from Hank-Choi, asp345 and davin111 and removed request for a team May 9, 2026 06:53
@eastshine2741 eastshine2741 merged commit 916fe7f into develop May 9, 2026
2 checks passed
@eastshine2741 eastshine2741 deleted the eastshine2741/fix-duplicate-search-query branch May 9, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants