Hi Eric, Wouldn't it be easier to do this on client-side and to provide Elasticsearch with the tags in an array?
Otherwise, you should be able to achieve this behavior thanks to the patter tokenizer[1]. [1] http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-pattern-tokenizer.html On Thu, May 1, 2014 at 9:56 PM, Eric Sims <[email protected]>wrote: > so i've got some data in a field (originally from my sql db) that is a > delimited string. > > in the example of music. i've got a field of genres associated to an album. > > a document may look something like : 'genres': 'Rock | Pop | Alternative'. > > i want to get a faceted result with those values being split up. > > something like: > > "facets": { > "tags": { > "_type": "terms", > "missing": 841, > "total": 159, > "other": 3, > "terms": [ > { > "term": "Rock", > "count": 89 > }, > { > "term": " Pop, > "count": 42 > }, > { > "term": " Alternative", > "count": 16 > }, > ] > } > } > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/f665bd3c-5546-4029-939c-09e7d60d2286%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/f665bd3c-5546-4029-939c-09e7d60d2286%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Adrien Grand -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6bzzASXhtgFhBiKNmmo4gR2_ppV_OHsH8L7ZTKyXL1WA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
