我正在调试一个带有分页结果的站点搜索功能,该功能在任意数量的页面后失败。
search: Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.
Run Code Online (Sandbox Code Playgroud)
但是,我确信它正在使用索引:
winningPlan:
{ stage: 'PROJECTION',
transformBy:
{ score: { '$meta': 'textScore' },
shootId: 1,
title: 1,
publishDate: 1,
'media.images.indexImage': 1,
'media.images.adImage': 1,
'media.images.galleryImages': 1,
'media.images.portrait': 1,
'media.promos.images.410': 1,
'media.full.full.length': 1,
contentProducer: 1,
performers: 1,
site: 1 },
inputStage:
{ stage: 'TEXT',
indexPrefix: {},
indexName: 'textSearchIndex',
parsedTextQuery:
{ terms: [ 'milk' ],
negatedTerms: [], …Run Code Online (Sandbox Code Playgroud)