Skip to content

[fix] 가게 데이터 생성 시 인덱스 키 삭제 수정#267

Merged
daylikezero merged 2 commits intodevfrom
feat/search
May 2, 2025
Merged

[fix] 가게 데이터 생성 시 인덱스 키 삭제 수정#267
daylikezero merged 2 commits intodevfrom
feat/search

Conversation

@daylikezero
Copy link
Copy Markdown
Contributor

🔗 Issue Number

close #260

📝 작업 내역

🤔 가게 생성 시 기존 캐시 삭제 이유: 이전 캐시를 불러올 경우 새로 추가된 가게가 포함되어 있지 않아 조회 불가능

  • 전체 캐시 삭제: 캐시 히트율이 감소 캐시 실효성이 떨어짐 → 인덱스 재조회 : ES 부하 증가
  • 조건 키 삭제: 새로 추가된 가게가 포함될 수 있을 캐시 키를 예측하여 해당 키만 삭제
    → 성능과 데이터 정합성 균형 유지 가능

AS-IS: 조건 키 삭제 로직 중 키워드를 검색하지 않은 전체 검색(*:keyword=) 캐시가 누락 → 신규 가게를 전체 목록에서 찾을 수 없음

TO-BE:

  • 전체 검색(*:keyword=) 캐시 + 키워드 ngram 토큰 분해하여 키 탐색 및 삭제

  • 카테고리 아이디 기준 조건 삭제 (키워드 조건에 포함되어 굳이 카테고리 기준으로 삭제할 필요가 없음)

  • evictSearchCacheForNewStore 로직 수정

💡 PR 특이사항

📸 스크린샷

Copy link
Copy Markdown
Contributor

@3uomlkh 3uomlkh 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
Copy Markdown
Contributor

@mannaKim mannaKim left a comment

Choose a reason for hiding this comment

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

수고하셨습니다! 👍

@daylikezero daylikezero merged commit d7c5902 into dev May 2, 2025
1 check passed
@daylikezero daylikezero deleted the feat/search branch May 5, 2025 07:02
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.

[FIX] 가게 데이터 생성 시 인덱스 키 삭제 에러

3 participants