Provide $sample aggregation operator

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.27.0
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • Fully Compatible
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      Availability of the coll.Aggregate().Sample aggregation stage.

      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      Yes.

      3. Which versions of the driver/connector does this apply to?
      2.27.0 and later.

      Show
      1. What would you like to communicate to the user about this feature? Availability of the coll.Aggregate().Sample aggregation stage. 2. Would you like the user to see examples of the syntax and/or executable code and its output? Yes. 3. Which versions of the driver/connector does this apply to? 2.27.0 and later.
    • None
    • None
    • None
    • None
    • None
    • None

      Please, provide $sample aggregation operator, that not exists now

       

      var mentions = await _context.For<MentionEntity>()
       .Aggregate()
       .Sample(count)
       .Project(x => new { x.Id })
       .ToListAsync();

              Assignee:
              James Kovacs
              Reporter:
              Ivan Artemov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: