Skip to content

Commit

Permalink
support case_insensitive on term query
Browse files Browse the repository at this point in the history
  • Loading branch information
jillesvangurp committed Jun 3, 2024
1 parent 800662c commit 036e3c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ val termLevelQueriesMd = sourceGitRepository.md {
}.pretty("Term Query.").let { println(it) }
}

+"""
By default term queries are case sensitive. But you can turn that off.
""".trimIndent()
example {
client.search(indexName) {
query = term(TestDoc::tags, "fRuIt") {
caseInsensitive = true
}
}.pretty("Term Query.").let { println(it) }
}.printStdOut()


}
section("Terms query") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ fun QueryClauses.regExp(
class TermQueryConfig : JsonDsl() {
var value by property<Any>()
var boost by property<Double>()
var caseInsensitive by property<Boolean>()
}

@SearchDSLMarker
Expand Down

0 comments on commit 036e3c3

Please sign in to comment.