You have several options now:
- Upgrade specific mapping types create to multi_field mapping with additional internal mapping that is index : not_analyzed. This will apply to newly created docs.
 - If you want, you can use dynamic templates to apply that to all string fields, though that will require more memory per shard. Its better to control which field you really want to do it.
 
In the future, there will be an option to build the field cache values (the field cache is used to do faceting) from the _source. This means that it will be as "not_analyzed", though, will take more time to build this field cache.
-shay.banon
On Friday, April 22, 2011 at 9:37 AM, tsuna wrote:
Hi,
I have a field I want to facet on, and it happens that this field is
often made of 2 or 3 words. When I use term faceting on this field,
it works but the results I get back are tokenized, so if my field was
"a b c" I'm going to get 3 things back (like "a": 1, "b": 1, "c": 1 â
instead of "a b c": 1).In a previous post [1], Shay said "You need to have the field you run
the terms facet on marked as not_analyzed in its mapping. You will
need to reindex the data in order for that to take affect (and of
course, create the mappings before you index data)."Is there a way to work around this limitation? My mapping is created
dynamically and I like it this way, and I've indexed several GB of
data already, I'm not sure how I would go about re-indexing everything
(I only have a copy of the data in ES because it isn't very important
data, but it's kind of a bummer that I'd have to re-index it or nuke
it just because the field I wanna facet on is not not_analyzed).--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com