Skip to content

Commit

Permalink
Clean up last mentions of MultiQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
valencik committed Jul 30, 2024
1 parent 84d566b commit a36de85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions core/src/test/scala/pink/cozydev/lucille/QuerySuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ class QuerySuite extends munit.FunSuite {
assertEquals(q.mapLastTerm(expandQ), expected)
}

test("MultiQuery.mapLastTerm does nothing for ending minimum-should-match query") {
test("Query.mapLastTerm does nothing for ending minimum-should-match query") {
val qs = "(apple banana orange)@2"
val mq = parseQ(qs)
assertEquals(mq.map(_.mapLastTerm(expandQ)), mq)
val q = parseQ(qs)
assertEquals(q.map(_.mapLastTerm(expandQ)), q)
}

test("MultiQuery.mapLastTerm does nothing for ending range query") {
test("Query.mapLastTerm does nothing for ending range query") {
val qs = "name:[cats TO fs2]"
val mq = parseQ(qs)
assertEquals(mq.map(_.mapLastTerm(expandQ)), mq)
val q = parseQ(qs)
assertEquals(q.map(_.mapLastTerm(expandQ)), q)
}

test("MultiQuery.mapLastTerm does nothing for ending group query") {
test("Query.mapLastTerm does nothing for ending group query") {
val qs = "cats AND (dogs OR fish)"
val mq = parseQ(qs)
assertEquals(mq.map(_.mapLastTerm(expandQ)), mq)
val q = parseQ(qs)
assertEquals(q.map(_.mapLastTerm(expandQ)), q)
}
}
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def expandQ(q: Query): Query =
}
```

We can now use `expandQ` along with `mapLastTerm` to rewrite the last term of a `MultiQuery` into our
We can now use `expandQ` along with `mapLastTerm` to rewrite the last term of a `Query` into our
expanded term + prefix:

```scala mdoc
Expand Down

0 comments on commit a36de85

Please sign in to comment.