Operations
一般的なクエリ、書き込み、ルート集約、Atlas Search、Vector SearchのターミナルおよびDriver拡張操作を整理します。
一般的なクエリターミナル
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ベースのページをskip/limitで適用
sorts(...) / SortSpec.driver(Bson)
DSLソートとDriver-nativeソートを入力順に構成
excludes(String...)
プロジェクション除外
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ターミナル
findAll().execute()
Flux<E> 검색 결과
findAll().executePage() / executePageStream()
ページ結果またはリアクティブページラッパー
find().execute() / executeFirst()
Mono<E> 단건 결과
count().execute()
$search後の最終pipeline結果のcount
count().executeSearchMeta()
$searchMetaに基づくAtlas Searchメタデータのcount
existsQuery().execute()
検索結果の存在確認
stage(Bson) / driverOptions(...) / operator(SearchOperator)
Driver-native Search拡張パス
ベクトル検索ターミナル
findAll().execute() / find().execute()
ベクトルパイプラインの結果をFlux/Monoで返す
count().execute() / existsQuery().execute()
ベクトル制限後のパイプライン結果のcount/exists
parentFilter(...) / nestedScoreMode(...)
Driver 5.10のネスト/配列埋め込み便利API
query(VectorSearchQuery) / driverOptions(...) / stage(Bson)
Driverネイティブベクトル検索拡張パス
診断
preview()
DBを実行せずに現在のquery/pipelineを診断用ドキュメントとしてレンダリング
explain([ExplainVerbosity])
実際のMongoDB Driverのexplain実行