feat(search): 키워드 검색 — 요약 카운트·상품 목록·매장 목록 - #253
Conversation
검색 결과 화면(figma search 06 전체 탭 / 07 상품 탭 / 08 매장 탭) 대응(검색 화면 API 3/4). spec 문서가 없어 시안 + 문답으로 정책 확정. - 매칭: 정규화된 검색어를 공백 분리해 단어별 AND. 상품은 (상품명 ∨ 태그명) contains, 매장은 매장명 contains. 삭제된 태그·연결, 비활성/삭제 카테고리·매장·상품 제외. - searchProducts(input): eventCategoryIds/styleCategoryIds(그룹 내 OR·그룹 간 AND), minPrice/maxPrice(표시가 sale ?? regular 기준, min>max 400), regionIds, sort POPULAR(기본, 시안 '추천순')/LATEST/BEST_SELLING(최근 30일 수량)/PRICE_ASC/PRICE_DESC, offset+limit(최대 50)+totalCount. 카드: SearchProduct(평점·리뷰수·찜 여부 포함, OptionalJwt). 정렬 5종을 "후보 전량 → 메모리 정렬 → 페이지" 파이프라인으로 통일(인기/판매순이 메모리 점수화라 DB 페이지네이션 불가 — 인기 매장과 동일 트레이드오프, 자체 판단). - searchStores(input): 매장명 AND 매칭 + regionIds, 인기순 고정(시안에 매장 정렬 시트 없음), 카드 SearchStore(로고·평점·지역·대표 이미지 4장·찜 여부). StoreListingService.scoreStores 로 점수화를 분리해 인기 매장과 산식 공유. - searchSummary(input): 상품/매장 건수(키워드+지역만). 각 도메인의 where 빌더를 그대로 세어 목록·카운트가 어긋나지 않게 함. '전체 N' 합산과 '+' 표기는 FE. - 검색어 검증을 common/utils/search-keyword.parseSearchKeyword(400)로 통합 (recordSearch·상품·매장·요약이 공유). 태그 팩토리 추가. 자체 판단(시안 외): 카테고리 id 타입(EVENT/STYLE) 서버 미검증, 동률 id desc, 판매순에서 판매 0건도 뒤에 유지, BEST_SELLING 동률 id desc. 테스트 35건: 단어 AND·태그·삭제 태그, 활성 조건, 카테고리 OR/AND·비활성, 가격 경계· min>max 400, 지역, 정렬 5종·동률, 페이지·카드·찜, 매장 검색 동일 축, 요약 카운트, resolver 통합.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🩺 NestJS Doctor — 90/100 (Excellent)진단 287건 (error 0).
architecture / security 상위 항목
|
🧹 knip — dead-code 리포트전체 리포트
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1765 tests passing in 206 suites. Report generated by 🧪jest coverage report action from c53c4b4 |
배경
검색 결과 화면(figma
search/06~08: 전체/상품/매장 탭) 대응(검색 화면 API 3/4). #251 #252 후속.변경
searchProducts:eventCategoryIds/styleCategoryIds(그룹 내 OR·그룹 간 AND),minPrice/maxPrice(표시가sale ?? regular, min>max 400),regionIds,sortPOPULAR(기본)/LATEST/BEST_SELLING(30일 수량)/PRICE_ASC/PRICE_DESC, offset+limit(≤50)+totalCount. 카드SearchProduct(평점·리뷰수·isWishlisted, OptionalJwt).searchStores: 매장명 AND +regionIds, 인기순 고정.StoreListingService.scoreStores분리로 산식 공유. 카드SearchStore(로고·평점·지역·이미지 4·찜).searchSummary: 상품/매장 건수(키워드+지역). 각 도메인 where 빌더 재사용으로 목록·카운트 일치.parseSearchKeyword(common)로 검색어 400 검증 통합. 태그 팩토리 추가.자체 판단(시안 외)
카테고리 id 타입 서버 미검증(FE가
categories(type)id만 전달 전제), 동률 id desc, 판매순에서 0건도 뒤에 유지.테스트
35건 추가.
yarn validate통과(206 suites).