Skip to content

Conversation

@username1103
Copy link
Contributor

@username1103 username1103 commented Nov 25, 2025

https://www.mongodb.com/docs/atlas/atlas-search/operators-collectors/in/#in-operator

add token type value for in search operator

value boolean, objectId, number, date, uuid, or string Value or values to search. Value can be either a single value or an array of values of only one of the supported BSON types and can't be a mix of different types. To search for string values in a field, you must index the field as the MongoDB Search token type. Required

Summary by CodeRabbit

새로운 기능

  • In 검색 연산자에서 문자열 값 지원: 단일 또는 여러 문자열 값을 직접 전달하여 검색 조건 구성 가능

✏️ Tip: You can customize this high-level summary in your review settings.

@hong3-inflab hong3-inflab self-assigned this Nov 25, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

📝 Walkthrough

Walkthrough

InSearchOperatorDsl에 문자열 값을 받아들이는 두 가지 새로운 오버로드가 추가되었습니다(가변 인자 및 Iterable), 해당 동작을 검증하는 단위 테스트 두 건이 함께 추가되었습니다.

Changes

Cohort / File(s) 변경 요약
InSearchOperatorDsl 확장
core/src/main/kotlin/.../InSearchOperatorDsl.kt
문자열 값을 위한 두 개의 오버로드 추가: fun value(vararg value: String)@JvmName("valueStringIterable") fun value(value: Iterable<String>). 문서의 document["value"]에 문자열 목록을 저장하도록 구현.
문자열 값 테스트
core/src/test/kotlin/.../InSearchOperatorDslTest.kt
단일 문자열과 다중 문자열을 사용하여 In 연산자 값을 빌드하는 테스트 2건 추가: 값이 JSON 배열로 직렬화되는지 검증.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • 새로운 오버로드가 기존 패턴(boolean/number/date/ObjectId)과 일관된지 확인할 것
  • @JvmName 적용으로 인한 JVM 시그니처 충돌 여부 검토
  • 테스트가 직렬화 형식(배열)과 에지 케이스(빈 iterable 등)를 올바르게 다루는지 확인

Poem

🐇 나는 토끼, 코드 숲을 훌쩍,
문자열을 모아 작은 바구니에 넣네.
한 알이건 여러 알이건 모두 환영,
테스트가 춤추고 빌드는 미소 짓네.
킁킁—검색이 더 가벼워졌어요! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 일치합니다. 'in search operator'에 대한 'token type value' 지원 추가가 코드 변경 사항(String 값을 받는 오버로드 메서드 추가)과 PR 설명과 정확히 일치합니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
core/src/test/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDslTest.kt (1)

302-348: 문자열 value DSL 테스트는 적절하며, Iterable에 대한 추가 테스트를 고려할 수 있음

단일 문자열과 복수 문자열에 대한 in 연산자 JSON 구조를 잘 검증하고 있어, 새 value(vararg value: String) 오버로드 동작이 명확히 보장됩니다.

추가로, 필요하다면 value(listOf("value1", "value2"))와 같이 Iterable<String> 오버로드를 직접 검증하는 테스트를 하나 더 두면 커버리지가 완전해집니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d5a03e2 and 9416a4b.

📒 Files selected for processing (2)
  • core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDsl.kt (1 hunks)
  • core/src/test/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDslTest.kt (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
core/src/test/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDslTest.kt (3)
core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/SearchOperator.kt (1)
  • in (169-169)
core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/SearchOperatorDsl.kt (1)
  • in (77-79)
core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDsl.kt (10)
  • value (65-67)
  • value (75-78)
  • value (86-88)
  • value (96-99)
  • value (107-109)
  • value (117-120)
  • value (128-130)
  • value (138-141)
  • value (149-151)
  • value (159-162)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
Copy link
Member

@inflab-int inflab-int 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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDsl.kt (1)

143-162: String value 오버로드 구현이 기존 패턴과 잘 맞습니다 (Iterable 테스트는 선택적으로 추가 고려)

  • Boolean/Temporal/Number/ObjectId용 오버로드들과 동일한 방식으로 String에 대해 vararg + Iterable을 제공하고 있어 DSL 일관성이 좋습니다.
  • @JvmName("valueStringIterable")도 기존 valueObjectIdIterable 등과 충돌 없이 의미가 잘 드러납니다.

추가로, 현재 PR 설명 기준으로는 vararg String 케이스만 테스트되고 있는 것처럼 보이는데, 가능하다면 Iterable<String>(예: listOf("value1", "value2"))에 대한 단일 테스트도 하나 두면 회귀 방지에 도움이 될 것 같습니다. 기능상 필수는 아니라서 여유 있을 때만 고려하셔도 될 것 같습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9416a4b and 6dfd502.

📒 Files selected for processing (2)
  • core/src/main/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDsl.kt (1 hunks)
  • core/src/test/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDslTest.kt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • core/src/test/kotlin/com/github/inflab/spring/data/mongodb/core/aggregation/search/InSearchOperatorDslTest.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
@hong3-inflab hong3-inflab merged commit b6483aa into inflearn:main Nov 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants