First of all I'm completly new to ES. I created ES search criteria below for searching items which works fine but what I now need is, I want to turn make field into case-insensitive so that the search result would be the same for hello
, HeLlo
, HELLO
so on.
I've read post below couldn't quiet apply to my example below because of my very limited knowledge:
- Case insensitivity does not work
- Elasticsearch Map case insensitive to not_analyzed documents
- Elasticsearch Snowball Analyzer wants exact word
Removing not_analyzed
from make doesn't help.
'indexes' => [
'my_project' => [
'client' => 'default',
'index_name' => 'hello',
'settings' => [
'index' => [
'analysis' => [
'analyzer' => [
'snowball_analyzer' => [
'type' => 'snowball',
'language' => 'English',
],
],
],
],
],
'types' => [
'item' => [
'mappings' => [
'uuid' => ['type' => 'string', 'index' => 'not_analyzed'],
'name' => ['type' => 'string', 'boost' => 8, 'analyzer' => 'snowball_analyzer'],
'make' => ['type' => 'string', 'index' => 'not_analyzed'],
]
],
],
],
],
These is the query that I created:
1
{
"query": {
"filtered": {
"query": {
"bool": {
"must": [
{
"term": {
"make": "HeLlo"
}
}
]
}
}
}
}
}