Which gives better search performance? Search in list element or search in text

To give a better context, if I have a field called "countries".
Value of countries can be put as a space separated string (type string) e.g. "de en es"
or it can be saved as a proper list (type object) e.g. ["de", "en", "es"].
I want to use this field for filtering of my search queries.
My concern is about the search performance (scaling) over real time searches (a lot).
Thank you for your insights.

Hi, I suggest you to use an array of String not_analyzed.

Thank you for your reply.
Can you give some more reasoning how array is better than plain string ?

Because your field doesn't need to be analysed and will be used as a filter (faster) So values need to be splitted. Moreover, you will be able build aggregation on it.

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