Atlas Vector Search 결과 설명
이 페이지의 내용
메서드를 사용하여 Atlas Vector Search 쿼리 explain
실행 쿼리 쿼리 내부적으로 실행 된 방식을 설명하는 실행 쿼리 계획 계획이 포함된 BSON 문서반환합니다.
다음도 참조하세요.
구문
db.<myCollection>.explain("<verbosity>").aggregate([ { "$vectorSearch": { "exact": true | false, "filter": {<filter-specification>}, "index": "<index-name>", "limit": <number-of-results>, "numCandidates": <number-of-candidates>, "path": "<field-to-search>", "queryVector": [<array-of-numbers>] } } ])
상세
상세 모드 explain
의 동작과 반환되는 정보의 양을 제어합니다. 값은 상세도가 낮은 순서대로 다음 중 하나일 수 있습니다.
쿼리에 대한 실행 쿼리 가 포함된 | |
쿼리에 대한 실행 통계가 포함된 | |
queryPlanner(기본값) | 쿼리 계획에 대한 정보입니다. 쿼리에 대한 실행 통계를 포함하는 |
다음도 참조하세요.
결과 설명
explain
메서드는 다음 필드가 있는 BSON 문서 반환합니다.
옵션 | 유형 | 필요성 | 목적 |
---|---|---|---|
| 문서 | 옵션 | 수집기에 대한 실행 통계를 설명합니다. |
| 문서 | 옵션 | 유용한 메타데이터를 포함합니다. |
| 문서 | 옵션 | 쿼리 에 대한 실행 통계를 설명합니다. 이는 |
| 문서 | 옵션 | 쿼리 실행 후 문서별 데이터 검색과 관련된 세부 정보입니다. |
| 문서 | 옵션 | 쿼리가 실행되었을 때 쿼리의 리소스 사용량 세부 정보를 제공합니다. |
collectors
collectors
은 다음 필드 있는 BSON 문서 입니다.
필드 | 유형 | 필요성 | 목적 |
---|---|---|---|
| 문서 | 필수 사항 | 쿼리 의 모든 수집기 통계입니다. 보고된 통계는 쿼리 에 사용된 모든 수집기의 최대값 또는 모든 하위 수집기의 통계 합계를 나타냅니다. 타이밍 통계는 전체 쿼리 에 대해 모든 수집기에서 소요된 총 시간을 반영하기 위해 합산됩니다. 자세한 학습 은 |
allCollectorStats
allCollectorStats
은 쿼리 에 지정된 모든 수집기의 수집기 통계를 설명하는 BSON 문서 입니다. 여기에는 다음과 같은 키가 포함되어 있습니다.
필드 | 설명 |
---|---|
| 수집기가 수집한 결과의 지속 시간과 수량을 추적합니다. |
| 수집기에서 |
| 수집기에 설정된 점수 계산기의 총 지속 시간과 횟수를 추적하는 통계입니다. |
metadata
metadata
는 다음과 같은 유용한 메타데이터를 포함합니다.
필드 | 유형 | 필요성 | 목적 |
---|---|---|---|
| 문자열 | 옵션 |
|
| 문자열 | 옵션 |
|
| 문자열 | 옵션 | 쿼리 에 사용된 Atlas Vector Search 인덱스 . |
| 문서 | 옵션 |
|
| Integer | 옵션 | 삭제된 문서를 포함하여 인덱스 에 있는 총 문서 수입니다. |
query
explain
응답은 쿼리의 실행 통계를 설명하는 키와 값이 포함된 BSON 문서입니다. 결과 세트의 explain
문서에는 다음 필드가 포함되어 있습니다.
필드 | 유형 | 필요성 | 목적 |
---|---|---|---|
| 문자열 | 옵션 | 루트가 아닌 경우에만 쿼리된 임베딩 필드 의 경로입니다. |
| 문자열 | 필수 사항 | 벡터 검색 쿼리 유형의 이름입니다. 자세한 내용은 |
| 문서 | 필수 사항 | 벡터 검색 쿼리 정보입니다. 자세한 내용은 |
| 문서 | 옵션 |
|
args
설명 응답 에는 쿼리 내부적으로 실행된 방식에 대한 정보가 포함되어 있습니다. args
필드 에는 다음과 같은 세부 정보가 포함되어 있습니다.
쿼리 유형
각 쿼리 유형에 대한 구조화된 요약 예시
구조화된 요약의 쿼리 옵션
다음 섹션에서는 구조화된 요약의 쿼리 유형과 필드에 대해 설명합니다.
WrappedKnnQuery
여러 쿼리를 결합하는 ANN 벡터 검색에 사용되는 래퍼 쿼리입니다. 구조화된 요약에는 다음 옵션에 대한 세부 정보가 포함되어 있습니다.
필드유형필요성설명query
배열
필수 사항
벡터 검색 에 사용되는 하위 쿼리의 배열로, 일반적으로
KnnFloatVectorQuery
및DocAndScoreQuery
를 포함합니다.
KnnFloatVectorQuery
부동 소수점 벡터에 대한 ANN 검색과 관련된 쿼리 유형입니다. 구조화된 요약에는 다음 옵션에 대한 세부 정보가 포함되어 있습니다.
필드유형필요성설명field
문자열
필수 사항
검색 중인 벡터 필드 경로 .
k
Integer
필수 사항
조회 할 가장 가까운 이웃의 수입니다.
ExactVectorSearchQuery
ENN 벡터 검색을 위한 쿼리 유형입니다. 구조화된 요약에는 다음 옵션에 대한 세부 정보가 포함되어 있습니다.
필드유형필요성설명field
문자열
필수 사항
검색 중인 벡터 필드 경로 .
similarityFunction
문자열
필수 사항
사용된 유사성 함수(
dotProduct
,cosine
또는euclidean
)입니다.filter
문서
옵션
벡터 검색 범위를 제한하는 사전 필터 쿼리 .
BooleanQuery
벡터 검색 쿼리 에서 사전 필터를 사용하는 경우 설명 결과에
BooleanQuery
유형이 포함됩니다. 이 유형의 필드 및 사전 필터 쿼리 와 관련된 기타 쿼리 유형에 대해 자세히 학습 Atlas Search 설명 페이지의 쿼리 유형을 참조하세요.
stats
executionStats 및 allPlansExecution 상세도 모드에 대한 explain
응답에는 stats
쿼리가 쿼리 실행의 다양한 단계 에서 소비하는 시간 에 대한 정보가 포함된 필드가 포함되어 있습니다.
타이밍 분석
타이밍 분석은 쿼리 실행 영역 과 관련된 실행 통계를 설명합니다. 다음 필드에는 타이밍 분석이 표시됩니다.
쿼리 영역
다음 쿼리 영역에 대한 통계를 사용할 수 있습니다.
resourceUsage
resourceUsage
문서는 쿼리 실행에 사용된 리소스를 보여줍니다. 다음 필드를 포함합니다.
필드 | 유형 | 필요성 | 목적 |
---|---|---|---|
| Long | 필수 사항 | 쿼리 실행 중 시스템이 메모리에서 필요한 데이터를 찾지 못해 디스크와 같은 백업 저장소에서 읽게 될 때 발생하는 주요 페이지 폴트 수입니다. |
| Long | 필수 사항 | 데이터가 페이지 캐시에 있지만 아직 프로세스의 페이지 테이블에 매핑되지 않은 경우 발생하는 경미한 페이지 폴트의 수입니다. |
| Long | 필수 사항 | 사용자 공간에서 소요된 CPU 시간(밀리초)입니다. |
| Long | 필수 사항 | 시스템 공간에서 소요된 CPU 시간(단위: 밀리초)입니다. |
| Integer | 필수 사항 | 모든 배치에서 쿼리 실행 중 |
| Integer | 필수 사항 | 쿼리 처리 시 요청된 |
예시
다음 예제에서는 샘플 ANN 및 ENN 쿼리에 explain
메서드를 사용합니다. 자신의 환경에서 다음 예제를 실행 하려면 먼저 을(를) 사용하여 Atlas Vector Search 빠른 시작을 완료해야 mongosh
합니다.
allPlansExecution
다음 예시 상세도 모드 사용하여 필드 plot_embedding
에 대한 ANN 및 ENN 벡터 검색 쿼리 allPlansExecution
에서 explain 메서드를 실행합니다.
db.embedded_movies.explain("allPlansExecution").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "numCandidates": 150, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10, explain: { query: { type: 'WrappedKnnQuery', args: { query: [ { type: 'KnnFloatVectorQuery', args: { field: '$type:knnVector/plot_embedding', k: 150 }, stats: { context: { millisElapsed: 0 }, match: { millisElapsed: 0 }, score: { millisElapsed: 0 } } }, { type: 'DocAndScoreQuery', args: {}, stats: { context: { millisElapsed: 0.011281, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.045831, invocationCounts: { nextDoc: Long('151') } }, score: { millisElapsed: 0.049853, invocationCounts: { score: Long('150'), setMinCompetitiveScore: Long('30') } } } } ] }, stats: { context: { millisElapsed: 3.226133, invocationCounts: { vectorExecution: Long('1'), createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.045831, invocationCounts: { nextDoc: Long('151') } }, score: { millisElapsed: 0.049853, invocationCounts: { score: Long('150'), setMinCompetitiveScore: Long('30') } } } }, collectors: { allCollectorStats: { millisElapsed: 0.211472, invocationCounts: { collect: Long('150'), competitiveIterator: Long('1'), setScorer: Long('1') } }, facet: { collectorStats: { millisElapsed: 0 } } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 }, resourceUsage: { majorFaults: Long('0'), minorFaults: Long('0'), userTimeMs: Long('0'), systemTimeMs: Long('0'), maxReportingThreads: 1, numBatches: 1 } } }, nReturned: Long('0'), executionTimeMillisEstimate: Long('29') }, { '$_internalSearchIdLookup': { limit: Long('10') }, nReturned: Long('0'), executionTimeMillisEstimate: Long('29') } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740781674, i: 1 }), signature: { hash: Binary.createFromBase64('gpGnPOB17p3NnKu74vhm+kCLXf8=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740781674, i: 1 }) }
db.embedded_movies.explain("allPlansExecution").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "exact": true, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10, explain: { query: { type: 'ExactVectorSearchQuery', args: { field: '$type:knnVector/plot_embedding', similarityFunction: 'dotProduct', filter: { type: 'DefaultQuery', args: { queryType: 'FieldExistsQuery' }, stats: { context: { millisElapsed: 0.031999, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 1.2138, invocationCounts: { nextDoc: Long('3403') } }, score: { millisElapsed: 0 } } } }, stats: { context: { millisElapsed: 0.055318, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 2.578062, invocationCounts: { nextDoc: Long('3403') } }, score: { millisElapsed: 5.624325, invocationCounts: { score: Long('3402'), setMinCompetitiveScore: Long('71') } } } }, collectors: { allCollectorStats: { millisElapsed: 7.095773, invocationCounts: { collect: Long('3402'), competitiveIterator: Long('1'), setScorer: Long('1') } }, facet: { collectorStats: { millisElapsed: 0 } } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 }, resourceUsage: { majorFaults: Long('0'), minorFaults: Long('0'), userTimeMs: Long('0'), systemTimeMs: Long('0'), maxReportingThreads: 1, numBatches: 1 } } }, nReturned: Long('0'), executionTimeMillisEstimate: Long('19') }, { '$_internalSearchIdLookup': { limit: Long('10') }, nReturned: Long('0'), executionTimeMillisEstimate: Long('19') } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740781894, i: 1 }), signature: { hash: Binary.createFromBase64('cNmipB7AsFGaT4ipmWCKizM/EbU=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740781894, i: 1 }) }
queryPlanner
다음 예시 상세도 모드 사용하여 필드 plot_embedding
에 대한 ANN 및 ENN 벡터 검색 쿼리 queryPlanner
에서 explain 메서드를 실행합니다.
db.embedded_movies.explain("queryPlanner").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "numCandidates": 150, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10, explain: { query: { type: 'WrappedKnnQuery', args: { query: [ { type: 'KnnFloatVectorQuery', args: { field: '$type:knnVector/plot_embedding', k: 150 } }, { type: 'DocAndScoreQuery', args: {} } ] } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 } } } }, { '$_internalSearchIdLookup': { limit: Long('10') } } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740782044, i: 1 }), signature: { hash: Binary.createFromBase64('/ZHh6h+2qbJtYdOBHmeZepo1Wsc=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740782044, i: 1 }) }
db.embedded_movies.explain("queryPlanner").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "exact": true, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10, explain: { query: { type: 'ExactVectorSearchQuery', args: { field: '$type:knnVector/plot_embedding', similarityFunction: 'dotProduct', filter: { type: 'DefaultQuery', args: { queryType: 'FieldExistsQuery' } } } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 } } } }, { '$_internalSearchIdLookup': { limit: Long('10') } } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740782103, i: 23 }), signature: { hash: Binary.createFromBase64('yn3TtM4cfhu6HXCGzBGPbLmlM4E=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740782103, i: 23 }) }
executionStats
다음 예시 상세도 모드 사용하여 필드 plot_embedding
에 대한 ANN 및 ENN 벡터 검색 쿼리 executionStats
에서 explain 메서드를 실행합니다.
db.embedded_movies.explain("executionStats").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "numCandidates": 150, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10, explain: { query: { type: 'WrappedKnnQuery', args: { query: [ { type: 'KnnFloatVectorQuery', args: { field: '$type:knnVector/plot_embedding', k: 150 }, stats: { context: { millisElapsed: 0 }, match: { millisElapsed: 0 }, score: { millisElapsed: 0 } } }, { type: 'DocAndScoreQuery', args: {}, stats: { context: { millisElapsed: 0.015853, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.013112, invocationCounts: { nextDoc: Long('151') } }, score: { millisElapsed: 0.033269, invocationCounts: { score: Long('150'), setMinCompetitiveScore: Long('30') } } } } ] }, stats: { context: { millisElapsed: 3.979414, invocationCounts: { vectorExecution: Long('1'), createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.013112, invocationCounts: { nextDoc: Long('151') } }, score: { millisElapsed: 0.033269, invocationCounts: { score: Long('150'), setMinCompetitiveScore: Long('30') } } } }, collectors: { allCollectorStats: { millisElapsed: 0.115101, invocationCounts: { collect: Long('150'), competitiveIterator: Long('1'), setScorer: Long('1') } }, facet: { collectorStats: { millisElapsed: 0 } } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 }, resourceUsage: { majorFaults: Long('0'), minorFaults: Long('0'), userTimeMs: Long('0'), systemTimeMs: Long('0'), maxReportingThreads: 1, numBatches: 1 } } }, nReturned: Long('0'), executionTimeMillisEstimate: Long('13') }, { '$_internalSearchIdLookup': { limit: Long('10') }, nReturned: Long('0'), executionTimeMillisEstimate: Long('13') } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], numCandidates: 150, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740782136, i: 1 }), signature: { hash: Binary.createFromBase64('33LuqO946oIzmslClhuu+Z+PthQ=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740782136, i: 1 }) }
db.embedded_movies.explain("executionStats").aggregate([ { "$vectorSearch": { "index": "vector_index", "path": "plot_embedding", "queryVector": QUERY_EMBEDDING, "exact": true, "limit": 10 } } ])
{ explainVersion: '1', stages: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10, explain: { query: { type: 'ExactVectorSearchQuery', args: { field: '$type:knnVector/plot_embedding', similarityFunction: 'dotProduct', filter: { type: 'DefaultQuery', args: { queryType: 'FieldExistsQuery' }, stats: { context: { millisElapsed: 0.029472, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.234054, invocationCounts: { nextDoc: Long('3403') } }, score: { millisElapsed: 0 } } } }, stats: { context: { millisElapsed: 0.050328, invocationCounts: { createWeight: Long('1'), createScorer: Long('2') } }, match: { millisElapsed: 0.622028, invocationCounts: { nextDoc: Long('3403') } }, score: { millisElapsed: 3.03997, invocationCounts: { score: Long('3402'), setMinCompetitiveScore: Long('71') } } } }, collectors: { allCollectorStats: { millisElapsed: 3.601357, invocationCounts: { collect: Long('3402'), competitiveIterator: Long('1'), setScorer: Long('1') } }, facet: { collectorStats: { millisElapsed: 0 } } }, metadata: { mongotVersion: '1.44.0', mongotHostName: '<hostname>.mongodb.net', indexName: 'vector_index', totalLuceneDocs: 3483 }, resourceUsage: { majorFaults: Long('0'), minorFaults: Long('0'), userTimeMs: Long('0'), systemTimeMs: Long('0'), maxReportingThreads: 1, numBatches: 1 } } }, nReturned: Long('0'), executionTimeMillisEstimate: Long('12') }, { '$_internalSearchIdLookup': { limit: Long('10') }, nReturned: Long('0'), executionTimeMillisEstimate: Long('12') } ], queryShapeHash: '9EFFBE6AC5B8DC66D20DB8939CF3ED6669D0C09BB6938C17AD3FB8C7793765B8', serverInfo: { host: '<hostname>.mongodb.net', port: 27017, version: '8.0.5', gitVersion: 'cb9e2e5e552ee39dea1e39d7859336456d0c9820' }, serverParameters: { internalQueryFacetBufferSizeBytes: 104857600, internalQueryFacetMaxOutputDocSizeBytes: 104857600, internalLookupStageIntermediateDocumentMaxSizeBytes: 104857600, internalDocumentSourceGroupMaxMemoryBytes: 104857600, internalQueryMaxBlockingSortMemoryUsageBytes: 104857600, internalQueryProhibitBlockingMergeOnMongoS: 0, internalQueryMaxAddToSetBytes: 104857600, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 104857600, internalQueryFrameworkControl: 'trySbeRestricted', internalQueryPlannerIgnoreIndexWithCollationForRegex: 1 }, command: { aggregate: 'embedded_movies', pipeline: [ { '$vectorSearch': { index: 'vector_index', path: 'plot_embedding', queryVector: [ -0.0016261312, -0.028070757, -0.011342932, -0.012775794, ... -0.0060913274, -0.007130985, -0.013109017, -0.009710136 ], exact: true, limit: 10 } } ], cursor: {}, '$db': 'sample_mflix' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1740782184, i: 1 }), signature: { hash: Binary.createFromBase64('tpxoW70Y+Z5HmDqaswag+matLQQ=', 0), keyId: Long('7446434162581438465') } }, operationTime: Timestamp({ t: 1740782184, i: 1 }) }