diff --git a/pom.xml b/pom.xml
index ea80a3cb74..b52eb48cc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.dataspring-data-mongodb-parent
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOTpomSpring Data MongoDB
diff --git a/spring-data-mongodb-cross-store/pom.xml b/spring-data-mongodb-cross-store/pom.xml
index ae0a5d6c8f..d094c33c3a 100644
--- a/spring-data-mongodb-cross-store/pom.xml
+++ b/spring-data-mongodb-cross-store/pom.xml
@@ -6,7 +6,7 @@
org.springframework.dataspring-data-mongodb-parent
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOT../pom.xml
@@ -48,7 +48,7 @@
org.springframework.dataspring-data-mongodb
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOT
diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml
index 2d02722262..1207711d69 100644
--- a/spring-data-mongodb-distribution/pom.xml
+++ b/spring-data-mongodb-distribution/pom.xml
@@ -13,7 +13,7 @@
org.springframework.dataspring-data-mongodb-parent
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOT../pom.xml
diff --git a/spring-data-mongodb-log4j/pom.xml b/spring-data-mongodb-log4j/pom.xml
index ee5e3336db..0ed96222fe 100644
--- a/spring-data-mongodb-log4j/pom.xml
+++ b/spring-data-mongodb-log4j/pom.xml
@@ -5,7 +5,7 @@
org.springframework.dataspring-data-mongodb-parent
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOT../pom.xml
diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml
index 8072d3f665..63df20cb10 100644
--- a/spring-data-mongodb/pom.xml
+++ b/spring-data-mongodb/pom.xml
@@ -11,7 +11,7 @@
org.springframework.dataspring-data-mongodb-parent
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATAMONGO-784-SNAPSHOT../pom.xml
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationFunctionExpressions.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationFunctionExpressions.java
index 0b88c039ce..761f2c3164 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationFunctionExpressions.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationFunctionExpressions.java
@@ -33,7 +33,7 @@
*/
public enum AggregationFunctionExpressions {
- SIZE;
+ SIZE, CMP, EQ, GT, GTE, LT, LTE, NE;
/**
* Returns an {@link AggregationExpression} build from the current {@link Enum} name and the given parameters.
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperation.java
index 73e11bf4dd..b26a2f27ed 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperation.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperation.java
@@ -616,6 +616,78 @@ public ProjectionOperationBuilder size() {
return project("size");
}
+ /**
+ * Generates a {@code $cmp} expression (compare to) that compares the value of the field to a given value or field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder cmp(Object compareValue) {
+ return project("cmp", compareValue);
+ }
+
+ /**
+ * Generates a {@code $eq} expression (equal) that compares the value of the field to a given value or field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder eq(Object compareValue) {
+ return project("eq", compareValue);
+ }
+
+ /**
+ * Generates a {@code $gt} expression (greater than) that compares the value of the field to a given value or field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder gt(Object compareValue) {
+ return project("gt", compareValue);
+ }
+
+ /**
+ * Generates a {@code $gte} expression (greater than equal) that compares the value of the field to a given value or
+ * field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder gte(Object compareValue) {
+ return project("gte", compareValue);
+ }
+
+ /**
+ * Generates a {@code $lt} expression (less than) that compares the value of the field to a given value or field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder lt(Object compareValue) {
+ return project("lt", compareValue);
+ }
+
+ /**
+ * Generates a {@code $lte} expression (less than equal) that compares the value of the field to a given value or
+ * field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder lte(Object compareValue) {
+ return project("lte", compareValue);
+ }
+
+ /**
+ * Generates a {@code $ne} expression (not equal) that compares the value of the field to a given value or field.
+ *
+ * @return never {@literal null}.
+ * @since 1.10
+ */
+ public ProjectionOperationBuilder ne(Object compareValue) {
+ return project("ne", compareValue);
+ }
+
/**
* Generates a {@code $slice} expression that returns a subset of the array held by the given field.
* If {@literal n} is positive, $slice returns up to the first n elements in the array.
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperationUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperationUnitTests.java
index bc1a06e51f..3807e30d73 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperationUnitTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ProjectionOperationUnitTests.java
@@ -19,6 +19,7 @@
import static org.junit.Assert.*;
import static org.springframework.data.mongodb.core.aggregation.AggregationFunctionExpressions.*;
import static org.springframework.data.mongodb.core.aggregation.Fields.*;
+import static org.springframework.data.mongodb.test.util.IsBsonObject.*;
import static org.springframework.data.mongodb.util.DBObjectUtils.*;
import java.util.Arrays;
@@ -402,6 +403,90 @@ public void shouldRenderSliceWithPositionCorrectly() throws Exception {
is((Object) new BasicDBObject("$slice", Arrays.