Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Adding two analyzers to additional index configurations - elasticsearch
Hi all,
I need to set new analyzers for elasticsearch using the control panel.
To achieve my aim I go to: Control Panel > Fondation > Elasticsearch.
Then I add the following configuration:
Additional Index Configurations:
When I add just one analyzer, it works very good, I have all my custom elements. With two analyzers my custom items are not present into the index.
How can I add two or more analyzers in the Additional Index Configurations?
I need to set new analyzers for elasticsearch using the control panel.
To achieve my aim I go to: Control Panel > Fondation > Elasticsearch.
Then I add the following configuration:
Additional Index Configurations:
{
"analysis": [
{
"analyzer": {
"documentum_analyzer": {
"filter": [
"lowercase"
],
"tokenizer": "documentum_tokenizer"
}
},
"tokenizer" : {
"documentum_tokenizer" : {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 10,
"token_chars": [
"letter",
"digit",
"punctuation"
]
}
}
},
{
"analyzer": {
"custom_rubrica_analyzer": {
"filter": [
"lowercase"
],
"tokenizer": "custom_rubrica_tokenizer"
}
},
"tokenizer" : {
"custom_rubrica_tokenizer" : {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 10,
"token_chars": [
"letter",
"punctuation"
]
}
}
}
]
}
When I add just one analyzer, it works very good, I have all my custom elements. With two analyzers my custom items are not present into the index.
How can I add two or more analyzers in the Additional Index Configurations?
The problem is with the JSON structure. Please look at the following JSON with 2 analysers.
{
"analysis":{
"analyzer":{
"analyser1":{
"type":"custom",
"tokenizer":"standard",
"char_filter":[
"html_strip"
],
"filter":[
"asciifolding",
"lowercase",
"typeahead_filter"
]
},
"analyser2":{
"type":"custom",
"tokenizer":"standard",
"char_filter":[
"html_strip"
],
"filter":[
"asciifolding",
"lowercase"
]
}
}
}
}
I hope this will fix your issue. Please let me know the status
Hi and sorry for the late.
Thanks for you example. It works properly.
Paolo.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™