ES questions

时间:2023-12-18 08:43:20

Be Careful of Cardinality

Numeric and date fields are indexed in such a way that ranges are efficient to calculate.

This is not the case for string fields, however. To perform a range on a string

field, Elasticsearch is effectively performing a term filter for every term that falls in

the range. This is much slower than a date or numeric range.

String ranges are fine on a field with