Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] 일반 검색 API 구현 #126

Merged
merged 27 commits into from
Aug 7, 2024
Merged

[FEAT] 일반 검색 API 구현 #126

merged 27 commits into from
Aug 7, 2024

Conversation

rinarina0429
Copy link
Contributor

@rinarina0429 rinarina0429 commented Jul 30, 2024

Related Issue

Key Changes

일반 검색 API를 구현했습니다.

  • 상세탐색과 마찬가지로 인기순으로 정렬해야 하기에 lastNovelId가 아닌 page 값을 받습니다.
  • 상세탐색과 마찬가지로 검색 결과로 나온 전체 작품 수를 응답해야 하기 때문에 Slice가 아닌 Page를 사용하였습니다.
  • 정렬 순서를 살펴보면,
    제목에서 쿼리를 포함하는 작품들 -> 인기순으로 정렬
    작가에서 쿼리를 포함하는 작품들 -> 인기순으로 정렬
    위 두 결과(리스트)를 합치기
    와 같이 진행됩니다.
    • 이 때 인기란 "관심 등록수, 보는 중 등록수, 봤어요 등록수를 총합한 값"을 뜻합니다.
  • 위와 같은 정렬을 JPQL 쿼리로 만들기는 어려워 Querydsl을 사용하였습니다.

To Reviewers

References

@rinarina0429 rinarina0429 self-assigned this Jul 30, 2024
Copy link
Contributor

@Kim-TaeUk Kim-TaeUk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코멘트 남겨두었습니다~

개행 사용이 전보다 많아진 것 같은데 이유가 있나요?

메서드 첫 줄 개행, 메서드 안에서 라인 끝날 때 개행
-> 얘네 개행하는 기준이 따로 있나요?

Copy link
Member

@ChaeAg ChaeAg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!!
쿼리가 넘 신기하고 ,, 복잡하네요 🥹
코멘트 하나 남겼습니다!!

Copy link
Member

@ChaeAg ChaeAg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고 많으셨습니다!! 😆 👍

@rinarina0429 rinarina0429 merged commit 92f8089 into dev Aug 7, 2024
1 check passed
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.

[FEAT] 일반 검색 API 구현
3 participants