Closed abu-zamzan closed 6 years ago
You're missing the querySuggestion mapping
it must be look like this
"querySuggestion": {
"dynamic_templates": [
{
"template_keywordSearch": {
"mapping": {
"type": "string",
"fields": {
"ngram": {
"search_analyzer": "standard",
"analyzer": "gsearch_shingle_analyzer",
"type": "string"
},
"suggest": {
"search_analyzer": "simple",
"analyzer": "simple",
"type": "completion"
}
}
},
"match": "keywordSearch_*",
"match_mapping_type": "string"
}
}
],
"properties": {
"companyId": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"groupId": {
"type": "string",
"index": "not_analyzed",
"store": true
},
"keywordSearch_en_US": {
"type": "string",
"fields": {
"ngram": {
"type": "string",
"analyzer": "gsearch_shingle_analyzer",
"search_analyzer": "standard"
},
"suggest": {
"type": "completion",
"analyzer": "simple",
"payloads": false,
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50
}
}
},
"priority": {
"type": "double",
"store": true
},
"spellCheckWord": {
"type": "string"
},
"uid": {
"type": "string",
"index": "not_analyzed",
"store": true
}
}
}
Where does it Need to be put? I have this in the portlet config for Suggester Configuration :
[
{
"suggesterType": "phrase",
"fieldName": "keywordSearch_$language_id.ngram",
"numberOfSuggestions": 5,
"confidence": "0.1f",
"gramSize": "2",
"maxErrors": "2.0f",
"realWordErrorLikelihood": "0.95f"
},
{
"suggesterType": "completion",
"fieldName": "keywordSearch_$language_id.suggest",
"numberOfSuggestions": 5
}
]
I think I copied and paste from : https://github.com/peerkar/liferay-gsearch/blob/master/binaries/latest/fi.soveltia.liferay.gsearch.core.configuration.GSearchCore.config#L2
Hi,
First, sorry for the delay because of holidays.
You are having this error because your Elasticsearch backend is missing the querysuggestion mapping. In order to create that you either have to create it manually or to use the custom Elasticsearch adapter and reindex - which creates it automatically. The custom adapter is at the moment not compatible with 7.1.
The configuration above in your comment is for the module configuration. The mapping has to be created in the Elasticsearch index configuration. Please see the current document.
I'm improving documentation to include compatibility matrix and also starting to upgrade the project to support 7.1, including some improvements. If you want to stay updated, please watch the project.
I just want to let you know that I have already ported your portlet towards 7.1. I'm pretty sure that it is not a perfect adaptation but I did all required so that at least your portlet run on 7.1.
But I found a deadly bug concerning Soy Portlets with the latest release of Liferay.
No SoyPortlets are working.
Let me know if you are interested.
Regarding the Soy bug: yes, please share. Could you also please check the Liferay issues at https://issues.liferay.com whether it's already fixed and if not, could you please report it so that it gets fixed. Thanks,,,
The bug is at this link: https://issues.liferay.com/browse/LPS-84198 I'm already in a talk with Liferay engineers for this bug but if you want to reproduce it I can send you the source code from the adapted code.
You can also yourself test the similar problem by using the latest Liferay IDE which comes with Blade 3.1.1 and generate a dummy soy portlet and try to run it on Liferay CE 7.1.10 GA1. The generated template is not working at all. At least your portlet is rendered but it is rendered twice which makes the UI inoperable.
Have a look : https://issues.liferay.com/browse/LPS-84287
Letting you know that GSearch for 7.1 is now available. There should be no SOY issues on the UI anymore but please file a ticket if you encounter anything.
Please notice that there's no custom ES adapter yet so the suggestions or query configuration won't work. The adapter will become available in the coming weeks.
Hi Do you have any idea why do I get this error :