We have used minimal_english stemmer filter in our mapping. This is to ensure that only singular and plural are searchable and not similar words. eg. Test and Tests should be searchable on entering the term - Test - but Tester/Testers/Testing should not be.
On trying to search, multi_field attribute types are searchable but keyword attribute types are not, when we use the RESTful API :
curl -X GET "http://10.113.124.136:9400/libtester/_search?pretty=true" -d '{
"query" : {
"query_string" : {
"query" : " DescriptionDescription " ,
"fields" : ["abc"]
}
}
}'
Mappings are as shown below :
"properties": {
"abc" : {
"type": "multi_field",
"fields":{
"c_asset_id": { "type": "string", "index": "analyzed", "include_in_all": true, "analyzer": "basic_english" },
"untouched": { "type": "string", "index": "analyzed", "include_in_all": false, "analyzer": "string_lowercase" }
}
},
"xyz": {
"type": "nested",
"properties": {
"c_viewpoint": {
"type": "multi_field",
"fields": {
"c_viewpoint": { "type": "string", "index": "analyzed", "include_in_all": true, "analyzer": "basic_english" },
"untouched": { "type": "string", "index": "analyzed", "include_in_all": false, "analyzer": "string_lowercase" }
}
}
}
}, ...
}
Is this to do with the mapping of nested types - xyz, that they are not searchable from the same API that multi_field types are?