U
U
un1t2014-07-16 10:20:05
elasticsearch
un1t, 2014-07-16 10:20:05

How to make facets in ElasticSearch case insensitive?

I have a catalog of goods, I want to make facets for brands.
This is what mapping looks like :

'properties': {
                'id': {'type': 'integer'},
                'name': {'type': 'string', 'analyzer': 'russian_morphology'},
                'price': {'type': 'integer'},
                'brand': {'type': 'string', 'index': 'not_analyzed'},
            }

Facets are built normally, but the problem is the following. One brand can be written in different ways - "adidas", "Adidas", "ADIDAS". Accordingly, there will be several spelling options in the facets. In principle, I can glue them all together before displaying them to the user, but the search for this field is case sensitive (because not_analyzed). If you specify analyzer - lowercase, then all facets will be output in the same register, which is also not desirable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Polushkin, 2015-02-12
@dmitry-polushkin

lowercase token filter?
www.elasticsearch.org/guide/en/elasticsearch/refer...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question