In Elasticsearch I wanted to index some fields with my custom analyzer. So I added to additional configurations my analyzer:
{
"analysis":{
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"polish_stem",
"asciifolding",
"pl_stop"
]
}
}
}
, then I added new mapping ( to Override type mappings), for example:
"title": {
"type": "text",
"boost": 9500,
"store": true,
"term_vector": "with_positions_offsets",
"analyzer": "my_analyzer"},
Then I deleted index and restarted Liferay. Portal created a new index with my custo 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 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 use it?
PS: I tried to add nested field to the main field and set them different mapping, but Liferay didn't want to search with nested field ex. "title.analyzed_field". Thank's for any suggestions!