In Elasticsearch I wanted to index some fields with my custom analyzer. So first, I added to additional configurations my analyzer
Liferay -> control panel -> System Settings -> " Serach Elasticsearch and select '-Elasticsearch 7-' -->"
Additional Index Configurations
{
"analysis": {
"analyzer": {
"mmc_custom": {
"tokenizer": "standard",
"filter": [
"standard",
"my_ascii_folding",
"lowercase"
]
}
},
"filter": {
"my_ascii_folding": {
"type": "asciifolding",
"preserve_original": true
}
}
}
}
Override Type Mappings
"title": {
"mapping": {
"analyzer": "mmc_custom",
"index": "analyzed",
"store": "true",
"term_vector": "with_positions_offsets",
"type": "string"
}
}
After adding this property in Liferay Elasticsearch, I reset the index, restarted Liferay. Portal created a new index with my mapping and my analyzer correctly. Then I reindexed my docs. And when I search sth in Elasticsearch it shows expected results, I see that it analyzed my fields as I wanted. But when I search through the Liferay portal I see no change, my field is not analyzed. What I am doing wrong? I have the new index and data comes from it so why Liferay does not see it?
I referred to this site.