Operations
일반 Query, write, root aggregation, Atlas Search와 Vector Search의 terminal 및 Driver 확장 operation을 정리합니다.
일반 Query terminal
findAll()
execute, executePageStream, executeAggregationStream, executeAggregationPageStream, executeAggregation, executeLookup, executeLookupAndCount
find()
execute, executeFirst, executeAggregation, executeLookup
count()
execute, executeAggregation, executeLookup
exists()
execute, executeAggregation, executeLookup
distinct(field, resultClass)
중복 제거 값을 Flux<R>로 반환
delete()
현재 criteria에 맞는 문서를 deleteMany 방식으로 삭제
atomicUpdate()
first/multi/upsertOne → document/pipeline → execute
일반 조회 옵션
paging(pageNumber, pageSize)
0-based page를 skip/limit으로 적용
sorts(...) / SortSpec.driver(Bson)
DSL sort와 Driver-native sort를 입력 순서대로 구성
excludes(String...)
projection exclude
readPreference(...)
MongoDB Driver ReadPreference 전달
isAllowDiskUse(boolean)
aggregation allowDiskUse 제어
customizeQuery(...) / customizeAggregation(...)
생성된 Driver publisher에 추가 옵션 적용
Driver-native root aggregation
aggregation().stage(Bson)
Driver stage 또는 raw Document를 pipeline에 호출 순서대로 추가
stages(Bson...) / stages(Collection<? extends Bson>)
여러 Driver-native stage 추가
execute()
source entity type으로 Flux 결과 매핑
execute(ResultType.class)
변경된 결과 shape를 지정 타입으로 매핑
executeDocument()
raw Document Flux 반환
Atlas Search terminal
findAll().execute()
Flux<E> 검색 결과
findAll().executePage() / executePageStream()
page 결과 또는 reactive page wrapper
find().execute() / executeFirst()
Mono<E> 단건 결과
count().execute()
$search 이후 최종 pipeline 결과 count
count().executeSearchMeta()
$searchMeta 기반 Atlas Search metadata count
existsQuery().execute()
검색 결과 존재 여부
stage(Bson) / driverOptions(...) / operator(SearchOperator)
Driver-native Search 확장 경로
Vector Search terminal
findAll().execute() / find().execute()
vector pipeline 결과를 Flux/Mono로 반환
count().execute() / existsQuery().execute()
vector limit 이후 pipeline 결과 count/exists
parentFilter(...) / nestedScoreMode(...)
Driver 5.10 nested/array embedding convenience API
query(VectorSearchQuery) / driverOptions(...) / stage(Bson)
Driver-native Vector Search 확장 경로
진단
preview()
DB를 실행하지 않고 현재 query/pipeline을 진단용 Document로 렌더링
explain([ExplainVerbosity])
실제 MongoDB Driver explain 실행