I have documents indexed in elastic cluster with the below mapping.
basically i have a field named model which holds car model names like
"Silverado 2500HD", "Silverado 1500HD" "LX 350" etc etc.
POST /location-test-no-boost {
"settings":{
"analysis":{
"analyzer":{
"mysynonym":{
"tokenizer":"standard",
"filter":[
"standard","lowercase","stop","mysynonym"
],
"ignore_case":true
}
},
"filter":{
"mysynonym":{
"type":"synonym",
"synonyms": [
"2500 HD=>2500HD",
"chevy silverado=>Silverado"
]
}
}
}
},
"mappings":{
"vehicles":{
"properties":{
"id":{
"type":"long",
"ignore_malformed":true
},
"model":{
"type":"String",
"index_analyzer": "standard",
"search_analyzer":"mysynonym"
}
}
}
}
}
The sample document content is
POST /location-test-no-boost/vehicles/10
{
"model" : "Silverado 2500HD"
}
When i tried to search with Query string "Chevy sivlerado", the synonym
matches perfectly to Silverado and gives back the result, on the contrary
when i tried to search via query string "2500 HD" it is returning 0
results. I tried different combination on the Synonym involving number and
found that elastic search synonym mapper does not support numbers is this
correct?
is there any way i can make some mapping when user searches for "2500 HD",
i can map the query to "2500HD"
--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d6e2183b-fa43-491d-a441-9c442926f492%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.