Does a field need to be indexed to filter / facet on it?

I'd like to filter / facet on a text field that contains a code ( eg. abc,
ab3, abz ... ). Do I need to set this field to { "index" : "analyzed" } (
or more appropriately { "index" : "not_analyzed" } since i'll want to
filter on the exact string. )??? What about other field types ... numeric,
dates, etc.

Filters seems to work fine on my development dataset ( hundreds of
thousands of docs ) when they aren't indexed, but I've yet to test a large
dataaset ( hundreds of millions of docs ).

I feel silly asking this question, but my other database experiences aren't
mapping to ES as I don't have a good handle on the underlying technology
yet.

: )

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You are correct, if you want to filter on the exact value of a string
field you should set it to "not_analyzed". This is only needed on
string fields due to tokenization of the string during indexing when
not set.

On Wed, Feb 13, 2013 at 9:25 AM, Brian Jones tbrianjones@gmail.com wrote:

I'd like to filter / facet on a text field that contains a code ( eg. abc,
ab3, abz ... ). Do I need to set this field to { "index" : "analyzed" } (
or more appropriately { "index" : "not_analyzed" } since i'll want to filter
on the exact string. )??? What about other field types ... numeric, dates,
etc.

Filters seems to work fine on my development dataset ( hundreds of thousands
of docs ) when they aren't indexed, but I've yet to test a large dataaset (
hundreds of millions of docs ).

I feel silly asking this question, but my other database experiences aren't
mapping to ES as I don't have a good handle on the underlying technology
yet.

: )

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.