diff --git a/audits/src/main/kotlin/dev/morphia/audits/rst/OperatorExample.kt b/audits/src/main/kotlin/dev/morphia/audits/rst/OperatorExample.kt index 92bd229271c..57e5c00baf8 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/rst/OperatorExample.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/rst/OperatorExample.kt @@ -22,7 +22,8 @@ class OperatorExample( init { val blocks = findBlocks(input) - dataBlock += blocks.removeWhile { !it.isAction() } + indexBlock = blocks.removeWhile { it.isIndex() }.firstOrNull() + dataBlock += blocks.removeWhile { !it.isAction() && !it.isIndex() } dataBlock.forEachIndexed { index, block -> block.type = DATA if (index != 0) { @@ -30,7 +31,6 @@ class OperatorExample( } } actionBlock = blocks.firstOrNull { it.isAction() } - indexBlock = blocks.firstOrNull { it.isIndex() } expectedBlock = blocks.firstOrNull { it.isExpected() } if (dataBlock.isEmpty()) { diff --git a/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt b/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt index 1a64597ec78..79cf7799bca 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/QueryAuditTest.kt @@ -13,8 +13,8 @@ class QueryAuditTest : BaseAuditTest() { @Test fun testOperator() { - val name = "ne" + val name = "text" val operator = Operator(FILTER, name) - operator.examples.forEach { it.output(File("target/testOperator-${name}/${it.name}")) } + operator.examples.forEach { it.output(File("target/testOperator/${name}/${it.name}")) } } }