'Returns the analysis dict to be used in settings for create_index.
For languages that ES supports we define either the minimal or light
stemming, which isn\'t as aggresive as the snowball stemmer. We also
define the stopwords for that language.
For all languages we\'ve customized we\'re using the ICU plugin.'

@classmethod
def get_analysis(cls):

    filters = {}
    analyzers = {}
    filters['custom_word_delimiter'] = {'type': 'word_delimiter', 'preserve_original': True}
    analyzers['default_icu'] = {'type': 'custom', 'tokenizer': 'icu_tokenizer', 'filter': ['custom_word_delimiter', 'icu_folding', 'icu_normalizer', 'lowercase']}
    analyzers['exact_lowercase'] = {'type': 'custom', 'tokenizer': 'keyword', 'filter': ['lowercase']}
    for (lang, stemmer) in mkt.STEMMER_MAP.items():
        filters[('%s_stem_filter' % lang)] = {'type': 'stemmer', 'name': stemmer}
        filters[('%s_stop_filter' % lang)] = {'type': 'stop', 'stopwords': [('_%s_' % lang)]}
        analyzers[('%s_analyzer' % lang)] = {'type': 'custom', 'tokenizer': 'icu_tokenizer', 'filter': ['custom_word_delimiter', 'icu_folding', 'icu_normalizer', ('%s_stop_filter' % lang), ('%s_stem_filter' % lang), 'lowercase']}
    return {'analyzer': analyzers, 'filter': filters}
