Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2659

Provide $sample aggregation operator

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.27.0
    • Affects Version/s: None
    • Component/s: API
    • 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.

      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@mongodb.com James Kovacs
            Reporter:
            zoxexivo@gmail.com Ivan Artemov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: