Skip to content

DATAMONGO-1325 Add support for $sample to aggregation. #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

DATAMONGO-1325 Add support for $sample to aggregation. #452

wants to merge 4 commits into from

Conversation

gustavodegeus
Copy link
Contributor

@gustavodegeus gustavodegeus commented Mar 26, 2017

Added $sample aggregation operator.

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our JIRA.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Sorry, something went wrong.

@mp911de mp911de changed the base branch from master to 1.11.x April 20, 2017 06:48
@mp911de
Copy link
Member

mp911de commented Apr 20, 2017

Thanks a lot for your PR. The code looks pretty decent. I'll take the PR from here.

mp911de pushed a commit that referenced this pull request Apr 20, 2017
We now support the $sample aggregation pipeline stage via Aggregation to select a random subset of result documents.

TypedAggregation<Employee> agg = Aggregation.newAggregation(Employee.class,
		sample(5));

Original pull request: #452.
mp911de added a commit that referenced this pull request Apr 20, 2017
Add since tag to new method. Set year of inception in copyright header. Add ticket reference to test. Minor code reformatting. Add integration test.

Change query keyword for query-by-example from $sample to $example to prevent accidental collisions.

Remove Mongo 3.4-next build profile due to removed Mongo 3.4 driver snapshots.

Original pull request: #452.
@mp911de
Copy link
Member

mp911de commented Apr 20, 2017

That's merged and polished now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants