String to Keywords

(Heath Aldrich) #1

We have a situation where we used to use Not Analyzed string fields.
The data in question looks like this: tag1,tag2,tag3
It is used for aggregation and got stored in an array of values e.g. [tag1,tag2,tag3] because it used a comma separator analyzer that spit out tokens split on commas.

Fast forward to Elastic now with Text and Keyword types...
We would like to make these Keyword types as they are not truly searched, just used for aggregation.
However, it appears that there is no way for a keyword to be multiple tokens.

I'm aware that we can turn on FieldData for a text field.
Is that our only choice, or is there some way to make use of the idea of Keywords instead of Text since we only want this data for aggregation.


(system) #2

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