-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[BUG] case_insensitive wildcard query didn't return expected result #15855
Copy link
Copy link
Closed
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't working
Description
Describe the bug
When perform wildcard query on wildcard field with case_insensitive set to true, the expected doc didn't occur.
Related component
Search
To Reproduce
-
Create a simple index contains wildcard field
PUT case_test { "mappings": { "properties": { "wildcard": { "type": "wildcard" } } } } -
Bulk insert documents contains capital letters
PUT _bulk?refresh=true {"index": {"_index": "case_test"}} {"wildcard": "TtAa"} {"index": {"_index": "case_test"}} {"wildcard": "ttaa"} {"index": {"_index": "case_test"}} {"wildcard": "TTAA"} -
Search on wildcard field with
case_insensitiveset totrueandfalserespectly
case sensitive:POST case_test/_search { "query": { "term": { "wildcard": { "value": "TtAa", "case_insensitive": false } } } }case insensitive:
POST case_test/_search { "query": { "term": { "wildcard": { "value": "TtAa", "case_insensitive": true } } } } -
Check result
Expected behavior
case insensitive query should return all three documents, instead of TtAa alone
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SearchSearch query, autocomplete ...etcSearch query, autocomplete ...etcbugSomething isn't workingSomething isn't working
Type
Projects
Status
✅ Done