Have spent quite a long time with this problem and would like to replicate the functionality removed (I think?) when the string type was deprecated and replaced by the text and keyword types. Mentioned in this StackOverflow post (https://stackoverflow.com/questions/31143136/indexing-a-comma-separated-value-field-in-elastic-search).
I have data relating to origin and destination country formatted as follows:
Unique ID: 1
Origin: USA,GBR,FRA
Target: CHN,RUS
Unique ID: 2
Origin: SYR
Target: FRA,GBR,RUS,CHN
The aim is to be able to aggregate the separate countries within these fields i.e. visualise the Unique Count of Unique ID with FRA within the Origin Column.
It would appear that this was the behaviour of the 'string' type prior to the introduction of the 'text' and 'keyword' types, but alas no longer.
I have attempted custom tokenizers and analyzers to no avail as well as formatting the input data with a separate row (linked via an ID) for each permutation of the different columns. However, this solution is not satisfactory as it makes the data effectively unreadable within a saved search on a dashboard.
Any help would be much appreciated