I am newbie to ELasticsearch and would need your help regarding ES returning unmatched results for analyzed field. i have a custom analyzer as follows:
"analyzer": {
"testing_analyzer": {
"type": "custom",
"char_filter": "html_strip",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"snowball",
"stop"
]
},
"testing_search_analyzer": {
"type": "custom",
"char_filter": "html_strip",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding"
]
}
}
i have set this analyzer for a field on both index & search as follows.
"name":
{
"type": "string",
"analyzer": "testing_analyzer",
"search_analyzer": "testing_search_analyzer"
}
but when search for name "università di bologna", it return first result record have same match, but some other records not match (2nd record in result below):
Record1:
[ "Università di Bologna", "University of Bologna", "CNR", "Università di Pisa", "University of Pisa", "Mineraria e Delle Tecnologie Ambientali" ]
Record2:
[ "University of Salerno", "Università di Salerno" ]
Query :
{
"fields": [
"doc_id",
"name"
],
"query": {
"match": {
"name": "Università di bologna"
}
}
}
any help ?!
testing_search_analyzer
defined ? – keety