shay.banon 对于type的解释
Index names are different indices. Types are just syntactic sugar to add separation between types of documents. If you know Lucene, type is just a field on a doc.
Let me explain a bit how types work in elasticsearch. At the end of the day, Lucene index has Documents and has no notion of types. Types are something added (as best as possible) by elasticsearch. A lucene document is a flat structure key value pair (so objects in json are also translated to this), and a type ends up as another field within the document (called _type).
Then you build a query and in the field (any query that acces a field to execute on), you can specify type1.field1, and in this case, it will be automatically detected, and the query will be wrapped to only be executed match on docs with _type:type1 (in an efficient manner), on field1.
type 的应用示例:
http://www.elasticsearch.org/blog/2010/02/12/yourdatayoursearch.html