From 6698c5d980b794113b293831860a9be27cb1ddaf Mon Sep 17 00:00:00 2001 From: evanchooly Date: Mon, 10 Jun 2024 22:28:24 -0400 Subject: [PATCH] update parser to find includes add tests for $bitsAllClear --- .../kotlin/dev/morphia/audits/RstAuditor.kt | 23 +-- .../dev/morphia/audits/model/Operator.kt | 82 +++++---- .../dev/morphia/audits/rst/RstDocument.kt | 29 +++- .../morphia/audits/AggregationAuditTest.kt | 7 +- .../dev/morphia/audits/QueryAuditTest.kt | 11 +- .../dev/morphia/query/filters/Filters.java | 14 ++ .../dev/morphia/test/query/FiltersTest.java | 1 + .../test/query/filters/TestBitsAllClear.java | 28 +++ .../filters/bitsAllClear/example1/action.json | 1 + .../filters/bitsAllClear/example1/data.json | 4 + .../bitsAllClear/example1/expected.json | 2 + .../query/filters/bitsAllClear/example1/name | 1 + .../filters/bitsAllClear/example2/action.json | 1 + .../filters/bitsAllClear/example2/data.json | 4 + .../bitsAllClear/example2/expected.json | 2 + .../query/filters/bitsAllClear/example2/name | 1 + .../filters/bitsAllClear/example3/action.json | 1 + .../filters/bitsAllClear/example3/data.json | 4 + .../bitsAllClear/example3/expected.json | 2 + .../query/filters/bitsAllClear/example3/name | 1 + docs/modules/ROOT/pages/query-filters.adoc | 160 ++++++++++++++++++ 21 files changed, 325 insertions(+), 54 deletions(-) create mode 100644 core/src/test/java/dev/morphia/test/query/filters/TestBitsAllClear.java create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/action.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/data.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/expected.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/name create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/action.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/data.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/expected.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/name create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/action.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/data.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/expected.json create mode 100644 core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/name diff --git a/audits/src/main/kotlin/dev/morphia/audits/RstAuditor.kt b/audits/src/main/kotlin/dev/morphia/audits/RstAuditor.kt index 4dbd4bccce7..ad144b39a7e 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/RstAuditor.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/RstAuditor.kt @@ -11,20 +11,21 @@ import kotlin.collections.Map.Entry import org.jboss.forge.roaster.model.source.MethodSource import org.jboss.forge.roaster.model.source.ParameterSource -object RstAuditor { - val auditRoot by lazy { - var gitRoot = File(".").canonicalFile - while (!File(gitRoot, ".git").exists()) gitRoot = gitRoot.parentFile - File(gitRoot, "audits/target/mongodb-docs") +class RstAuditor(val type: OperatorType) { + companion object { + val auditRoot by lazy { + var gitRoot = File(".").canonicalFile + while (!File(gitRoot, ".git").exists()) gitRoot = gitRoot.parentFile + File(gitRoot, "audits/target/mongodb-docs") + } + val coreTestRoot = File("../core/src/test/resources").absoluteFile + val coreTestSourceRoot = File("../core/src/test/java").absoluteFile + val includesRoot = File(auditRoot, "source") } - val coreTestRoot = File("../core/src/test/resources").absoluteFile - val coreTestSourceRoot = File("../core/src/test/java").absoluteFile - lateinit var operatorRoot: File - val includesRoot = File(auditRoot, "source") - fun audit(type: OperatorType): Results { - operatorRoot = File(auditRoot, "source/reference/operator/${type.root()}") + var operatorRoot = File(auditRoot, "source/reference/operator/${type.root()}") + fun audit(): Results { val methods = findMethods(type.taglet()) val operators = emitExampleData(type) val created = updateGH(operators) diff --git a/audits/src/main/kotlin/dev/morphia/audits/model/Operator.kt b/audits/src/main/kotlin/dev/morphia/audits/model/Operator.kt index 79bceafeaae..d3c293edb08 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/model/Operator.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/model/Operator.kt @@ -4,51 +4,59 @@ import dev.morphia.audits.RstAuditor import dev.morphia.audits.model.OperatorType.EXPRESSION import dev.morphia.audits.model.OperatorType.FILTER import dev.morphia.audits.model.OperatorType.STAGE -import dev.morphia.audits.rst.OperatorExample import dev.morphia.audits.rst.RstDocument import java.io.File -class Operator(var type: OperatorType, var source: File) { - var versionAdded: String? - var name = source.nameWithoutExtension - var resourceFolder: File - var testSource: File - val implemented: Boolean - val testCaseExists: Boolean - val operator = "\$${name.substringBefore("-")}" +class Operator private constructor(var type: OperatorType) { + val versionAdded by lazy { + source + .readLines() + .filter { it.contains(".. versionadded:: ") } + .firstOrNull() + ?.substringAfterLast(":") + ?.trim() + } + val resourceFolder by lazy { + File( + RstAuditor.coreTestRoot, + "dev/morphia/test/${type.root()}/${subpath()}/${name.substringBefore("-")}" + ) + .canonicalFile + } + val testSource by lazy { + File( + RstAuditor.coreTestSourceRoot, + "dev/morphia/test/${type.root()}/${subpath()}/Test${name.substringBefore("-").titleCase()}.java" + ) + .canonicalFile + } + val implemented by lazy { resourceFolder.exists() } + val testCaseExists by lazy { testSource.exists() } + val rstAuditor = RstAuditor(type) + val operator by lazy { "\$${name.substringBefore("-")}" } + val url: String by lazy { + "https://www.mongodb.com/docs/manual/reference/operator/${type.root()}/$name/" + } + val examples by lazy { RstDocument.read(operator, source).examples } + lateinit var source: File + lateinit var name: String - // val type: OperatorType - val url: String = "https://www.mongodb.com/docs/manual/reference/operator/${type.root()}/$name/" - val examples: List + constructor(type: OperatorType, file: File) : this(type) { + source = file + name = file.nameWithoutExtension + updateType() + } - init { + constructor(type: OperatorType, name: String) : this(type) { + this.name = name + source = File("${rstAuditor.operatorRoot}/$name.txt") + updateType() + } + + private fun updateType() { if (type == STAGE || type == EXPRESSION) { type = if (source.readText().contains(".. pipeline:: \$")) STAGE else EXPRESSION } - versionAdded = - source - .readLines() - .filter { it.contains(".. versionadded:: ") } - .firstOrNull() - ?.substringAfterLast(":") - ?.trim() - - resourceFolder = - File( - RstAuditor.coreTestRoot, - "dev/morphia/test/${type.root()}/${subpath()}/${name.substringBefore("-")}" - ) - .canonicalFile - testSource = - File( - RstAuditor.coreTestSourceRoot, - "dev/morphia/test/${type.root()}/${subpath()}/Test${name.substringBefore("-").titleCase()}.java" - ) - .canonicalFile - - implemented = resourceFolder.exists() - testCaseExists = testSource.exists() - examples = RstDocument.read(operator, source).examples } fun ignored() = File(resourceFolder, "ignored").exists() diff --git a/audits/src/main/kotlin/dev/morphia/audits/rst/RstDocument.kt b/audits/src/main/kotlin/dev/morphia/audits/rst/RstDocument.kt index 9d10786c23b..9150c0c283a 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/rst/RstDocument.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/rst/RstDocument.kt @@ -1,6 +1,7 @@ package dev.morphia.audits.rst import dev.morphia.audits.RstAuditor +import dev.morphia.audits.RstAuditor.Companion.includesRoot import dev.morphia.audits.findIndent import dev.morphia.audits.rst.Separator.TILDE import java.io.File @@ -23,12 +24,38 @@ class RstDocument(val operator: String, lines: MutableList) { val include = File(RstAuditor.includesRoot, line.substringAfter(":: ")) if (include.exists()) { include.readLines() - } else listOf(line) + } else { + loadInclude(line.substringAfterLast("/").substringBefore(".")) + ?: listOf(line) + } } else listOf(line) } .toMutableList() return RstDocument(operator, lines) } + + private fun loadInclude(keyword: String): List? { + return File(includesRoot, "includes") + .listFiles() + .filter { file -> file.isFile } + .mapNotNull { file -> loadReference(keyword, file) } + .firstOrNull() + } + + private fun loadReference(keyword: String, file: File): List? { + var lines = + file.readLines().dropWhile { line -> !line.contains("ref: $keyword") }.drop(1) + if (lines.isEmpty()) { + return null + } + lines = lines.dropWhile { !it.startsWith("content") && !it.startsWith("---") } + if (!lines[0].startsWith("content")) { + return null + } + val removeWhile = + lines.drop(1).toMutableList().removeWhile { it.isBlank() || it.startsWith(" ") } + return removeWhile + } } var examples: List = mutableListOf() diff --git a/audits/src/test/kotlin/dev/morphia/audits/AggregationAuditTest.kt b/audits/src/test/kotlin/dev/morphia/audits/AggregationAuditTest.kt index e6012fe13d7..25a5e274745 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/AggregationAuditTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/AggregationAuditTest.kt @@ -1,6 +1,5 @@ package dev.morphia.audits -import dev.morphia.audits.RstAuditor.operatorRoot import dev.morphia.audits.model.Operator import dev.morphia.audits.model.OperatorType.EXPRESSION import dev.morphia.audits.model.OperatorType.STAGE @@ -12,17 +11,17 @@ class AggregationAuditTest : BaseAuditTest() { @Test fun testOperator() { val name = "geoNear" - var operator = Operator(EXPRESSION, File("${operatorRoot}/$name.txt")) + val operator = Operator(EXPRESSION, name) operator.examples.forEach { it.output(File("target/testOperator-${name}/${it.name}")) } } @Test fun expressions() { - validate(RstAuditor.audit(EXPRESSION)) + validate(RstAuditor(EXPRESSION).audit()) } @Test fun stages() { - validate(RstAuditor.audit(STAGE)) + validate(RstAuditor(STAGE).audit()) } } diff --git a/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt b/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt index 5c0fb290b9b..81c7007b6fd 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt @@ -1,11 +1,20 @@ package dev.morphia.audits +import dev.morphia.audits.model.Operator import dev.morphia.audits.model.OperatorType.FILTER +import java.io.File import org.testng.annotations.Test class QueryAuditTest : BaseAuditTest() { @Test fun filters() { - validate(RstAuditor.audit(FILTER)) + validate(RstAuditor(FILTER).audit()) + } + + @Test + fun testOperator() { + val name = "bitsAllClear" + val operator = Operator(FILTER, name) + operator.examples.forEach { it.output(File("target/testOperator-${name}/${it.name}")) } } } diff --git a/core/src/main/java/dev/morphia/query/filters/Filters.java b/core/src/main/java/dev/morphia/query/filters/Filters.java index 8236029a189..24445861cb9 100644 --- a/core/src/main/java/dev/morphia/query/filters/Filters.java +++ b/core/src/main/java/dev/morphia/query/filters/Filters.java @@ -11,6 +11,7 @@ import dev.morphia.aggregation.expressions.impls.Expression; import dev.morphia.query.Type; +import org.bson.BsonBinary; import org.bson.Document; import static java.util.Arrays.asList; @@ -72,6 +73,19 @@ public static Filter bitsAllClear(String field, int bitMask) { return new Filter("$bitsAllClear", field, bitMask); } + /** + * Matches numeric or binary values in which a set of bit positions all have a value of 0. + * + * @param field the field to check + * @param data the data to use + * @return the filter + * @query.filter $bitsAllClear + * @since 3.0 + */ + public static Filter bitsAllClear(String field, byte[] data) { + return new Filter("$bitsAllClear", field, new BsonBinary(data)); + } + /** * Matches numeric or binary values in which a set of bit positions all have a value of 1. * diff --git a/core/src/test/java/dev/morphia/test/query/FiltersTest.java b/core/src/test/java/dev/morphia/test/query/FiltersTest.java index 78ed16b845d..2ce5ddee8e6 100644 --- a/core/src/test/java/dev/morphia/test/query/FiltersTest.java +++ b/core/src/test/java/dev/morphia/test/query/FiltersTest.java @@ -57,6 +57,7 @@ import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; +@Deprecated @SuppressWarnings("resource") public class FiltersTest extends TemplatedTestBase { @AfterClass diff --git a/core/src/test/java/dev/morphia/test/query/filters/TestBitsAllClear.java b/core/src/test/java/dev/morphia/test/query/filters/TestBitsAllClear.java new file mode 100644 index 00000000000..c40a2c92f1b --- /dev/null +++ b/core/src/test/java/dev/morphia/test/query/filters/TestBitsAllClear.java @@ -0,0 +1,28 @@ +package dev.morphia.test.query.filters; + +import dev.morphia.test.ServerVersion; + +import org.testng.annotations.Test; + +import static dev.morphia.query.filters.Filters.bitsAllClear; + +public class TestBitsAllClear extends FilterTest { + @Test + public void testExample1() { + testQuery(ServerVersion.ANY, false, true, (query) -> query.filter( + bitsAllClear("a", new int[] { 1, 5 }))); + } + + @Test + public void testExample2() { + testQuery(ServerVersion.ANY, false, true, (query) -> query.filter( + bitsAllClear("a", 35))); + } + + @Test + public void testExample3() { + testQuery(ServerVersion.ANY, false, true, (query) -> query.filter( + bitsAllClear("a", new byte[] { 32 }))); + } + +} diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/action.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/action.json new file mode 100644 index 00000000000..fdbb2b9b290 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/action.json @@ -0,0 +1 @@ +db.collection.find( { a: { $bitsAllClear: [ 1, 5 ] } } ) \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/data.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/data.json new file mode 100644 index 00000000000..ec9a9173fff --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/data.json @@ -0,0 +1,4 @@ +{ _id: 1, a: 54, binaryValueofA: "00110110" }, +{ _id: 2, a: 20, binaryValueofA: "00010100" }, +{ _id: 3, a: 20.0, binaryValueofA: "00010100" }, +{ _id: 4, a: BinData(0, "Zg=="), binaryValueofA: "01100110" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/expected.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/expected.json new file mode 100644 index 00000000000..b9cc57d1293 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/expected.json @@ -0,0 +1,2 @@ +{ "_id" : 2, "a" : 20, "binaryValueofA" : "00010100" } +{ "_id" : 3, "a" : 20, "binaryValueofA" : "00010100" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/name b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/name new file mode 100644 index 00000000000..bbb596dbc4a --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example1/name @@ -0,0 +1 @@ +Bit Position Array \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/action.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/action.json new file mode 100644 index 00000000000..4a269db5bbd --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/action.json @@ -0,0 +1 @@ +db.collection.find( { a: { $bitsAllClear: 35 } } ) \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/data.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/data.json new file mode 100644 index 00000000000..ec9a9173fff --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/data.json @@ -0,0 +1,4 @@ +{ _id: 1, a: 54, binaryValueofA: "00110110" }, +{ _id: 2, a: 20, binaryValueofA: "00010100" }, +{ _id: 3, a: 20.0, binaryValueofA: "00010100" }, +{ _id: 4, a: BinData(0, "Zg=="), binaryValueofA: "01100110" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/expected.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/expected.json new file mode 100644 index 00000000000..b9cc57d1293 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/expected.json @@ -0,0 +1,2 @@ +{ "_id" : 2, "a" : 20, "binaryValueofA" : "00010100" } +{ "_id" : 3, "a" : 20, "binaryValueofA" : "00010100" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/name b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/name new file mode 100644 index 00000000000..45884820524 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example2/name @@ -0,0 +1 @@ +Integer Bitmask \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/action.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/action.json new file mode 100644 index 00000000000..e9debd4cba9 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/action.json @@ -0,0 +1 @@ +db.collection.find( { a: { $bitsAllClear: BinData(0, "IA==") } } ) \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/data.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/data.json new file mode 100644 index 00000000000..ec9a9173fff --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/data.json @@ -0,0 +1,4 @@ +{ _id: 1, a: 54, binaryValueofA: "00110110" }, +{ _id: 2, a: 20, binaryValueofA: "00010100" }, +{ _id: 3, a: 20.0, binaryValueofA: "00010100" }, +{ _id: 4, a: BinData(0, "Zg=="), binaryValueofA: "01100110" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/expected.json b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/expected.json new file mode 100644 index 00000000000..b9cc57d1293 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/expected.json @@ -0,0 +1,2 @@ +{ "_id" : 2, "a" : 20, "binaryValueofA" : "00010100" } +{ "_id" : 3, "a" : 20, "binaryValueofA" : "00010100" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/name b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/name new file mode 100644 index 00000000000..a90b4622323 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/query/filters/bitsAllClear/example3/name @@ -0,0 +1 @@ +BinData Bitmask \ No newline at end of file diff --git a/docs/modules/ROOT/pages/query-filters.adoc b/docs/modules/ROOT/pages/query-filters.adoc index 7553a63673e..70db230a409 100644 --- a/docs/modules/ROOT/pages/query-filters.adoc +++ b/docs/modules/ROOT/pages/query-filters.adoc @@ -2,4 +2,164 @@ |=== |Operator|Docs +| http://docs.mongodb.org/manual/reference/operator/query/all[$all] +| link:javadoc/dev/morphia/query/filters/Filters.html#all(java.lang.String,java.lang.Object)[Filters#all(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/and[$and] +| link:javadoc/dev/morphia/query/filters/Filters.html#and(dev.morphia.query.filters.Filter%2E%2E%2E)[Filters#and(Filter...)] + +| http://docs.mongodb.org/manual/reference/operator/query/bitsAllClear[$bitsAllClear] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#bitsAllClear(java.lang.String,int)[Filters#bitsAllClear(String,int)] + * link:javadoc/dev/morphia/query/filters/Filters.html#bitsAllClear(java.lang.String,int)[Filters#bitsAllClear(String,int)] + + +| http://docs.mongodb.org/manual/reference/operator/query/bitsAllSet[$bitsAllSet] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#bitsAllSet(java.lang.String,int)[Filters#bitsAllSet(String,int)] + * link:javadoc/dev/morphia/query/filters/Filters.html#bitsAllSet(java.lang.String,int)[Filters#bitsAllSet(String,int)] + + +| http://docs.mongodb.org/manual/reference/operator/query/bitsAnyClear[$bitsAnyClear] +| link:javadoc/dev/morphia/query/filters/Filters.html#bitsAnyClear(java.lang.String,java.lang.Object)[Filters#bitsAnyClear(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/bitsAnySet[$bitsAnySet] +| link:javadoc/dev/morphia/query/filters/Filters.html#bitsAnySet(java.lang.String,java.lang.Object)[Filters#bitsAnySet(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/box[$box] +| link:javadoc/dev/morphia/query/filters/Filters.html#box(java.lang.String,com.mongodb.client.model.geojson.Point,com.mongodb.client.model.geojson.Point)[Filters#box(String,Point,Point)] + +| http://docs.mongodb.org/manual/reference/operator/query/center[$center] +| link:javadoc/dev/morphia/query/filters/Filters.html#center(java.lang.String,com.mongodb.client.model.geojson.Point,double)[Filters#center(String,Point,double)] + +| http://docs.mongodb.org/manual/reference/operator/query/centerSphere[$centerSphere] +| link:javadoc/dev/morphia/query/filters/Filters.html#centerSphere(java.lang.String,com.mongodb.client.model.geojson.Point,double)[Filters#centerSphere(String,Point,double)] + +| http://docs.mongodb.org/manual/reference/operator/query/comment[$comment] +| link:javadoc/dev/morphia/query/filters/Filters.html#comment(java.lang.String,java.lang.Object)[Filters#comment(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/elemMatch[$elemMatch] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#elemMatch(dev.morphia.query.filters.Filter%2E%2E%2E)[Filters#elemMatch(Filter...)] + * link:javadoc/dev/morphia/query/filters/Filters.html#elemMatch(java.lang.String,dev.morphia.query.filters.Filter%2E%2E%2E)[Filters#elemMatch(String,Filter...)] + + +| http://docs.mongodb.org/manual/reference/operator/query/eq[$eq] +| link:javadoc/dev/morphia/query/filters/Filters.html#eq(java.lang.String,java.lang.Object)[Filters#eq(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/exists[$exists] +| link:javadoc/dev/morphia/query/filters/Filters.html#exists(java.lang.String)[Filters#exists(String)] + +| http://docs.mongodb.org/manual/reference/operator/query/expr[$expr] +| link:javadoc/dev/morphia/query/filters/Filters.html#expr(dev.morphia.aggregation.expressions.impls.Expression)[Filters#expr(Expression)] + +| http://docs.mongodb.org/manual/reference/operator/query/geoIntersects[$geoIntersects] +| link:javadoc/dev/morphia/query/filters/Filters.html#geoIntersects(java.lang.String,com.mongodb.client.model.geojson.Geometry)[Filters#geoIntersects(String,Geometry)] + +| http://docs.mongodb.org/manual/reference/operator/query/geoWithin[$geoWithin] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#geoWithin(java.lang.String,com.mongodb.client.model.geojson.Polygon)[Filters#geoWithin(String,Polygon)] + * link:javadoc/dev/morphia/query/filters/Filters.html#geoWithin(java.lang.String,com.mongodb.client.model.geojson.MultiPolygon)[Filters#geoWithin(String,MultiPolygon)] + + +| http://docs.mongodb.org/manual/reference/operator/query/geometry[$geometry] +| link:javadoc/dev/morphia/query/filters/Filters.html#geometry(java.lang.String,java.lang.Object)[Filters#geometry(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/gt[$gt] +| link:javadoc/dev/morphia/query/filters/Filters.html#gt(java.lang.String,java.lang.Object)[Filters#gt(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/gte[$gte] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#gte(java.lang.String,java.lang.Object)[Filters#gte(String,Object)] + * link:javadoc/dev/morphia/query/filters/Filters.html#gte(java.lang.Object)[Filters#gte(Object)] + + +| http://docs.mongodb.org/manual/reference/operator/query/in[$in] +| link:javadoc/dev/morphia/query/filters/Filters.html#in(java.lang.String,java.lang.Iterable)[Filters#in(String,Iterable)] + +| http://docs.mongodb.org/manual/reference/operator/query/jsonSchema[$jsonSchema] +| link:javadoc/dev/morphia/query/filters/Filters.html#jsonSchema(org.bson.Document)[Filters#jsonSchema(Document)] + +| http://docs.mongodb.org/manual/reference/operator/query/lt[$lt] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#lt(java.lang.Object)[Filters#lt(Object)] + * link:javadoc/dev/morphia/query/filters/Filters.html#lt(java.lang.String,java.lang.Object)[Filters#lt(String,Object)] + + +| http://docs.mongodb.org/manual/reference/operator/query/lte[$lte] +| link:javadoc/dev/morphia/query/filters/Filters.html#lte(java.lang.String,java.lang.Object)[Filters#lte(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/maxDistance[$maxDistance] +| link:javadoc/dev/morphia/query/filters/Filters.html#maxDistance(java.lang.String,java.lang.Object)[Filters#maxDistance(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/meta[$meta] +a| + + * link:javadoc/dev/morphia/query/Meta.html#indexKey(java.lang.String)[Meta#indexKey(String)] + * link:javadoc/dev/morphia/query/Meta.html#searchHighlights(java.lang.String)[Meta#searchHighlights(String)] + * link:javadoc/dev/morphia/query/Meta.html#searchScore(java.lang.String)[Meta#searchScore(String)] + * link:javadoc/dev/morphia/query/Meta.html#textScore(java.lang.String)[Meta#textScore(String)] + + +| http://docs.mongodb.org/manual/reference/operator/query/minDistance[$minDistance] +| link:javadoc/dev/morphia/query/filters/Filters.html#minDistance(java.lang.String,java.lang.Object)[Filters#minDistance(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/mod[$mod] +| link:javadoc/dev/morphia/query/filters/Filters.html#mod(java.lang.String,long,long)[Filters#mod(String,long,long)] + +| http://docs.mongodb.org/manual/reference/operator/query/ne[$ne] +| link:javadoc/dev/morphia/query/filters/Filters.html#ne(java.lang.String,java.lang.Object)[Filters#ne(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/near[$near] +| link:javadoc/dev/morphia/query/filters/Filters.html#near(java.lang.String,com.mongodb.client.model.geojson.Point)[Filters#near(String,Point)] + +| http://docs.mongodb.org/manual/reference/operator/query/nearSphere[$nearSphere] +| link:javadoc/dev/morphia/query/filters/Filters.html#nearSphere(java.lang.String,com.mongodb.client.model.geojson.Point)[Filters#nearSphere(String,Point)] + +| http://docs.mongodb.org/manual/reference/operator/query/nin[$nin] +| link:javadoc/dev/morphia/query/filters/Filters.html#nin(java.lang.String,java.lang.Object)[Filters#nin(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/nor[$nor] +| link:javadoc/dev/morphia/query/filters/Filters.html#nor(dev.morphia.query.filters.Filter%2E%2E%2E)[Filters#nor(Filter...)] + +| http://docs.mongodb.org/manual/reference/operator/query/not[$not] +| link:javadoc/dev/morphia/query/filters/Filter.html#not()[Filter#not()] + +| http://docs.mongodb.org/manual/reference/operator/query/or[$or] +| link:javadoc/dev/morphia/query/filters/Filters.html#or(dev.morphia.query.filters.Filter%2E%2E%2E)[Filters#or(Filter...)] + +| http://docs.mongodb.org/manual/reference/operator/query/polygon[$polygon] +| link:javadoc/dev/morphia/query/filters/Filters.html#polygon(java.lang.String,com.mongodb.client.model.geojson.Point%2E%2E%2E)[Filters#polygon(String,Point...)] + +| http://docs.mongodb.org/manual/reference/operator/query/regex[$regex] +a| + + * link:javadoc/dev/morphia/query/filters/Filters.html#regex(java.lang.String,java.lang.String)[Filters#regex(String,String)] + * link:javadoc/dev/morphia/query/filters/Filters.html#regex(java.lang.String,java.util.regex.Pattern)[Filters#regex(String,Pattern)] + + +| http://docs.mongodb.org/manual/reference/operator/query/size[$size] +| link:javadoc/dev/morphia/query/filters/Filters.html#size(java.lang.String,int)[Filters#size(String,int)] + +| http://docs.mongodb.org/manual/reference/operator/query/slice[$slice] +| link:javadoc/dev/morphia/query/ArraySlice.html#limit(int)[ArraySlice#limit(int)] + +| http://docs.mongodb.org/manual/reference/operator/query/text[$text] +| link:javadoc/dev/morphia/query/filters/Filters.html#text(java.lang.String)[Filters#text(String)] + +| http://docs.mongodb.org/manual/reference/operator/query/type[$type] +| link:javadoc/dev/morphia/query/filters/Filters.html#type(java.lang.String,dev.morphia.query.Type)[Filters#type(String,Type)] + +| http://docs.mongodb.org/manual/reference/operator/query/uniqueDocs[$uniqueDocs] +| link:javadoc/dev/morphia/query/filters/Filters.html#uniqueDocs(java.lang.String,java.lang.Object)[Filters#uniqueDocs(String,Object)] + +| http://docs.mongodb.org/manual/reference/operator/query/where[$where] +| link:javadoc/dev/morphia/query/filters/Filters.html#where(java.lang.String)[Filters#where(String)] + |===