Is it faster to filter an integer compared to a string in ElasticSearch?

I have 3 elements of the archetype in my application, Weapon, Armour, Misc.

A user can search only one category at a time. So, I was wondering whether or not to index the archetype as an integer (0, 1, 2) or as a string "weapon", "armour", "misc"?

I am using a logical query. Will it be faster to filter by integer, string, or is there almost no difference?

+3
source share
1 answer

No difference.

Make sure that this is actually the filter you are using. It will then be cached as a bitmap and used just as quickly for later use.

+2
source

All Articles