Text VS Keyword

I am going to set my string as not indexed by elastic via mapping. So I do not need ANY search, aggregation, etc, whatsoever for certain strings.

I just need the string to come out together with other data when I search for other data.

Would "keyword" or "text" be more efficient if I care about memory usage?

Thanks!

Keyword is the best for this.

1 Like

Thank you!

You should also set index: false in the mapping for these fields; this means that the field will not be indexed for search, but will still be stored as part of the _source document returned.

2 Likes

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