Highlighting not working with keyword normalizer

[CUT]
When i set a normalizer with lowercase filter for a field with keyword data type, the highlighting for this field doesn't work. If i create mapping without setting normalizer property of keyword data type, it works. Because of case insensitive search on keyword field, i set the normalizer property and search query works very well, but highlighting doesn't work anymore.
[/CUT]

Python:

# https://discuss.elastic.co/t/insensitive-case-sort-error-mapping-definition-for-fields-has-unsupported
#     -parameters-analyzer-case-insensitive-sort/71877/3
normalizers['lowercase_normalizer'] = {
    'type': 'custom',
    'filter': ['lowercase', 'asciifolding']
}

Mappings:

'name': {'normalizer': 'lowercase_normalizer', 'type': 'keyword', 'doc_values': False},
or
'keywords': {'normalizer': 'lowercase_normalizer', 'type': 'keyword'},

Linked to this:

Any idea?

Thanks,

David

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.