What could be the reason that a term query behaves case sensitive in some installations and case insensitive in others? In the mapping the affected field is of type keyword. Both installations use the same Docker Compose setup with ES 8.10.2 and both use exactly the same mapping for the index. (excerpt of which included at the bottom)
The only obvious difference I see is that one is on Intel Mac while the other is on Arm Mac.
Mapping excerpt
{
"settings": {
"analysis": {
"analyzer": {
"standard_html": {
"char_filter": [
"html_strip"
],
"tokenizer": "standard",
"filter": [
"lowercase"
]
}
}
}
},
"mappings": {
"properties": {
"content": {
"type": "text",
"analyzer": "standard_html"
},
"title": {
"type": "text",
"analyzer": "standard_html"
},
"meta": {
"properties": {
"createdAt": {
"type": "date",
"format": "strict_date_time"
},
"project": {
"properties": {
"type": {
"type": "keyword"
},
"name": {
"type": "keyword"
}
}
}
}
}
}
}
}
Example query
GET /my-index/_search
{
"query": {
"bool": {
"filter": [
{
"term": {
"meta.project.type": {
"value": "COMPONENT"
}
}
}
],
"must": [
{
"multi_match": {
"fields": [
"content",
"title"
],
"query": "graph",
"tie_breaker": 0.3
}
}
]
}
}
}
The actual value in the indexed documents for meta.project.type
is "COMPONENT". The query works for me. However, a co-worker needs to query for "component" to get any hits (or use "case_insensitive": true
).