def es_analyzer_for_locale(locale, synonyms=False, fallback='standard'):

    if locale in settings.ES_LOCALE_ANALYZERS:
        analyzer = settings.ES_LOCALE_ANALYZERS[locale]
        if synonyms and locale in config.ES_SYNONYM_LOCALES:
            analyzer += '-synonyms'
    else:
        analyzer = fallback

    if (not settings.ES_USE_PLUGINS and
            analyzer in settings.ES_PLUGIN_ANALYZERS):
        analyzer = fallback

    return analyzer
Pick an appropriate analyzer for a given locale.
dataset/ETHPy150Open mozilla/kitsune/kitsune/search/es_utils.py/es_analyzer_for_locale