Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-100360

$rankFusion with pipeline with $sample and $sort fails in JS Test

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL

      Started work on SERVER-99695 where I added a test called ranked_fusion_sample.js that tests different variations of ranked selection pipelines that include the $sample stage.

      Observed that the following command fails when it should work: 

      assert.commandWorked(db.runCommand({    aggregate: jsTestName(),    pipeline:        [{$rankFusion: {input: {pipelines: {sampled: [{$sample: {size: 4}}, {$sort: {i: 1}}]}}}}],    cursor: {}})); 

      It fails with 

      Location40218: query requires sort key metadata, but it is not available

      See SERVER-99695's Draft PR for the full JS test.

       

            Assignee:
            will.buerger@mongodb.com Will Buerger
            Reporter:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: