String vs other types

Hi,

What are the pros and cons of using string type vs other types?

For example, it seems I can index a date using either "string" or "date".
So what are the differences?
Any reason I should choose one over another?

Thanks.

Using range queries with date fields rocks for example.

You can easily search for a date from 2011 to 2012-02-01 for example.

Using numbers will help to compute facets (mean, min, max, ...)

HTH
David :wink:
@dadoonet

Le 8 févr. 2012 à 19:05, chimingc jchen@sugarcrm.com a écrit :

Hi,

What are the pros and cons of using string type vs other types?

For example, it seems I can index a date using either "string" or "date".
So what are the differences?
Any reason I should choose one over another?

Thanks.

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/String-vs-other-types-tp3726900p3726900.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.