#47 Can't set languages for fields of type langdetect when profile is shorttext #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this fix we first try to get the value of
languageslist (if available) before using the default value forlanguages_short_text. We don't need initialization oflanguagesinDEFAULT_SETTINGSbecause we provide a default value when getting the languages (elasticsearch-plugin-bundle/src/main/java/org/xbib/elasticsearch/plugin/bundle/common/langdetect/LangdetectService.java
Line 174 in e75891a
DEFAULT_LANGUAGES_SHORT_TEXTwill be used if no configuration is provided (default constructor). The only drawback of this approach is if someone provide settings that containslanguagesbut not containslanguages_short_textand actually want to useDEFAULT_LANGUAGES_SHORT_TEXT. This case could be avoided if the default constructor is used in the situation.However test case needs to be created...