Text VS Keyword


#1

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!


(Mark Walkom) #2

Keyword is the best for this.


#3

Thank you!


(Russ Cam) #4

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.


Elastic String Types
(system) #5

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