Skip to content

Commit

Permalink
Added example to docs, updated test case, closes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
VigneshSK17 committed Mar 24, 2024
1 parent 004eb97 commit 4915e61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class FrequencyIndexSearcherSuite extends munit.FunSuite {
}

test("regex") {
val q = search("/a(c|l)/")
val results = Set(1, 2)
val q = search("/jump.*/ /cat/")
val results = Set(0, 1, 2)
assertEquals(
q,
Right(results)
Expand Down
9 changes: 9 additions & 0 deletions docs/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,12 @@ Additionally, field queries can take more complex boolean queries if specified i
```scala mdoc
search("author:([b TO e] AND NOT dr*)")
```

## Regex Query

Regex queries allow for greater query flexibility by utilizing powerful regular expressions.

```scala mdoc
search("/jump.*")
```

0 comments on commit 4915e61

Please sign in to comment.