Hello,
I am running into an issue with a synonym pair I have set up. I have the synonyms, "bar,pub" and while returning results from about 3000 different categories one of the two will not appear given a direct search query.
Below are example results for each query:
And here is my current configuration. Any suggestions on what I could do to make sure bar will appear in the first 10 results and pub would return in the first 10 results when queried for?
curl -XPUT http://localhost:9200/categories -d '{
"settings": {
"analysis": {
"filter": {
"edge_ngram_filter": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 20
},
"category_synonym_filter": {
"type": "synonym",
"synonyms": ["bike,bicycle", "bar,pub", "shop,store", "burger,hamburger", "bbq,barbecue", "isp,internet service provider", "exterminator,pest control service", "adult entertainment club,strip club"]
}
},
"analyzer": {
"edge_ngram_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"edge_ngram_filter"
]
},
"search_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"category_synonym_filter"
]
}
}
}
},
"mappings": {
"category": {
"properties": {
"category_description": {
"type": "string",
"analyzer": "edge_ngram_analyzer",
"search_analyzer": "search_analyzer"
},
"type" : {
"type" : "string",
"index" : "not_analyzed"
}
}
}
}
}'
Thank you for any help in advance!