|
17 | 17 |
|
18 | 18 | import static org.springframework.data.mongodb.core.aggregation.Fields.*;
|
19 | 19 |
|
20 |
| -import java.util.ArrayList; |
21 | 20 | import java.util.Arrays;
|
22 | 21 | import java.util.List;
|
23 | 22 |
|
24 | 23 | import org.bson.Document;
|
25 | 24 | import org.springframework.data.domain.Sort;
|
26 | 25 | import org.springframework.data.domain.Sort.Direction;
|
27 | 26 | import org.springframework.data.mongodb.core.aggregation.CountOperation.CountOperationBuilder;
|
28 |
| -import org.springframework.data.mongodb.core.aggregation.ExposedFields.DirectFieldReference; |
29 |
| -import org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField; |
30 |
| -import org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference; |
31 | 27 | import org.springframework.data.mongodb.core.aggregation.FacetOperation.FacetOperationBuilder;
|
32 |
| -import org.springframework.data.mongodb.core.aggregation.FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation; |
33 | 28 | import org.springframework.data.mongodb.core.aggregation.GraphLookupOperation.StartWithBuilder;
|
34 | 29 | import org.springframework.data.mongodb.core.aggregation.ReplaceRootOperation.ReplaceRootDocumentOperationBuilder;
|
35 | 30 | import org.springframework.data.mongodb.core.aggregation.ReplaceRootOperation.ReplaceRootOperationBuilder;
|
36 |
| -import org.springframework.data.mongodb.core.aggregation.Fields.*; |
37 | 31 | import org.springframework.data.mongodb.core.query.Criteria;
|
38 | 32 | import org.springframework.data.mongodb.core.query.CriteriaDefinition;
|
39 | 33 | import org.springframework.data.mongodb.core.query.NearQuery;
|
@@ -384,15 +378,16 @@ public static LimitOperation limit(long maxElements) {
|
384 | 378 | }
|
385 | 379 |
|
386 | 380 | /**
|
387 |
| - * Creates a new {@link SampleOperation} to selects the specified number of documents from its input randomly. |
| 381 | + * Creates a new {@link SampleOperation} to select the specified number of documents from its input randomly. |
388 | 382 | *
|
389 | 383 | * @param sampleSize must not be less than zero.
|
390 | 384 | * @return
|
| 385 | + * @since 2.0 |
391 | 386 | */
|
392 | 387 | public static SampleOperation sample(long sampleSize) {
|
393 | 388 | return new SampleOperation(sampleSize);
|
394 | 389 | }
|
395 |
| - |
| 390 | + |
396 | 391 | /**
|
397 | 392 | * Creates a new {@link MatchOperation} using the given {@link Criteria}.
|
398 | 393 | *
|
|
0 commit comments