How can I get ES to search for the words "data base" and "database" in the index when the query word is "database" or "data base"?
another example : when the user queries the word "clean up" or "cleanup", ES should search for both "clean up" and "cleanup".
I tried decompounding using the following code :
es.indices.create(
index= "zentest",
body= {
"settings": {
"analysis": {
"analyzer": {
"standard_dictionary_decompound": {
"tokenizer": "standard",
"filter": [ "dictionary_decompound" ]
}
},
"filter": {
"dictionary_decompound": {
"type": "dictionary_decompounder",
"word_list_path": "decompound_words.txt",
"max_subword_size": 22
}
}
}
}
}
)
the .txt file has the following words, one on each line
database
cleanup
Didn't work. the text has "clean up". When I query "clean up" I get a hit. I get nothing when I query "cleanup".
Do I need to filter using synonyms ?