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/board service] Full Text Search 구현 in 커뮤니티 파트 #231

Merged
merged 5 commits into from
Aug 25, 2023

Conversation

dldmsql
Copy link
Member

@dldmsql dldmsql commented Aug 25, 2023

주요 작업 내용

한 줄로 정리해주세요.

Full Text Search 구현 in 커뮤니티 파트

작업 내용

  • full text 검색 구현을 위한 dialect 커스터마이징
  • 기존 쿼리와 성능 비교 ( 데이터 100건 기준 )

주말내집 PROD DB 서버에 존재하는 데이터 중 "트인테리어" 키워드 검색을 통해 데이터 조회 테스트

image

이를 위해서 DB 서버에 아래와 같이 인덱스를 생성해야 합니다.

ALTER TABLE board ADD FULLTEXT INDEX idx_board_title(title) WITH PARSER NGRAM;
ALTER TABLE board ADD FULLTEXT INDEX idx_board_content(content) WITH PARSER NGRAM;

자연어 기반으로 검색하기에 대용량 데이터에서 성능이 LIKE 검색보다 좋습니다.

CheckList

  • CI를 통과했나요?
  • 리뷰어를 등록했나요?
  • 참고 레퍼런스가 있을 경우, PR 혹은 댓글로 남겼나요?

dialect 커스터마이징 및 설정 주입
게시글 제목과 내용에 대한 검색 쿼리 튜닝
기댓값과 결과값 불일치 문제 해결
@dldmsql dldmsql added feature 기능 개발 이슈 test 테스트 코드 labels Aug 25, 2023
@dldmsql dldmsql self-assigned this Aug 25, 2023
@dldmsql
Copy link
Member Author

dldmsql commented Aug 25, 2023

공식문서를 참고하며 개발하였습니다.

개발 중 많은 레퍼런스에서 numberTemplate에 Double 형을 지정하여 사용하였는데, 작업 중에 해당 부분에서 계속 오류가 발생했습니다. Double 형에서 Integer 형으로 변경하니 정상적으로 기능이 수행되었습니다.

오류에 대한 원인은 아직 파악하지 못했습니다.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@dldmsql dldmsql merged commit 08b720d into dev Aug 25, 2023
@dldmsql
Copy link
Member Author

dldmsql commented Aug 25, 2023

image

실제 배포 이후, 테스트를 하는 화면입니다.

image

최종 응답까지 68ms 소요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 기능 개발 이슈 test 테스트 코드
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant