Skip to content

feat(search): 키워드 검색 — 요약 카운트·상품 목록·매장 목록 - #253

Merged
chanwoo7 merged 1 commit into
developfrom
feat/search-keyword-results
Aug 30, 2026
Merged

feat(search): 키워드 검색 — 요약 카운트·상품 목록·매장 목록#253
chanwoo7 merged 1 commit into
developfrom
feat/search-keyword-results

Conversation

@chanwoo7

Copy link
Copy Markdown
Member

배경

검색 결과 화면(figma search/06~08: 전체/상품/매장 탭) 대응(검색 화면 API 3/4). #251 #252 후속.

변경

  • 매칭: 정규화 검색어를 공백 분리해 단어별 AND. 상품 = (상품명 ∨ 태그명) contains, 매장 = 매장명 contains. 삭제 태그·연결, 비활성/삭제 카테고리·매장·상품 제외.
  • searchProducts: 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(평점·리뷰수·isWishlisted, OptionalJwt).
    • 정렬 5종을 "후보 전량 → 메모리 정렬 → 페이지"로 통일(인기/판매순이 메모리 점수화 — 인기 매장과 동일 트레이드오프).
  • 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).

검색 결과 화면(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 통합.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0aaf7007-4648-4dfa-b657-6e77c1bec048

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🩺 NestJS Doctor — 90/100 (Excellent)

진단 287건 (error 0).

Category error warning info
architecture 0 0 9
correctness 0 139 0
performance 0 24 16
schema 0 0 86
security 0 13 0
architecture / security 상위 항목
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'IAuditLogRepository'.
  • warning security/security/no-exposed-env-vars: Direct 'process.env.NODE_ENV' access in 'AuthController'. Use ConfigService instead.
  • warning security/security/require-guards-on-endpoints: Endpoint 'start' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'callback' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'refresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'logout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'devIssueToken' has no @UseGuards() at class or method level.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/conversation/repositories/conversation.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'ConversationRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/order/repositories/order.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'OrderRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/product/repositories/product.repository'.

오탐 포함 가능 · 기준 docs/guide/architecture-conventions.md

@github-actions

Copy link
Copy Markdown

🧹 knip — dead-code 리포트

Unused exported types (2)
Duplicate exports (1)
전체 리포트
Unused exported types (2)
ProductSearchScope  type  src/features/product/index.ts:20:8
StoreSearchScope    type  src/features/store/index.ts:17:8  
Duplicate exports (1)
KEYWORD_RANK_SNAPSHOT_SIZE|MAX_POPULAR_KEYWORDS_LIMIT  src/features/search/constants/search.constants.ts

청소 후보(오탐 가능) · 기준 docs/guide/architecture-conventions.md

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 97.86% 5450/5569
🟢 Branches 94.08% 2147/2282
🟢 Functions 96.58% 1072/1110
🟢 Lines 98.45% 4949/5027

Test suite run success

1765 tests passing in 206 suites.

Report generated by 🧪jest coverage report action from c53c4b4

@chanwoo7
chanwoo7 merged commit 2f04210 into develop Aug 30, 2026
12 checks passed
@chanwoo7
chanwoo7 deleted the feat/search-keyword-results branch August 30, 2026 19:08
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.

1 participant