mattbaird/elastigo — pull request #134 by mikosik (2014-10-30 11:47:27+00:00)
Title: Fix PutMapping() to correctly handle 'nested' type

Added handling of 'nested' type to lib.PutMapping() function.

Reason:
Elastic-search contains abstraction called nested objects.
see http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/mapping-nested-type.html
Nested objects can be specified in mapping, see http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/nested-mapping.html
This means that for fields that have tag ```elastic:"type:nested"``` applied, function lib.PutMapping() should investigate its inner fields (when type of field is structure/slice).

I split this pull-request into three separate commits. This way reviewing code should be easier.

I couldn't run all tests without failures as I hit the same issue as described here https://github.com/mattbaird/elastigo/issues/108
However all the tests that pass on my local workstation when run against freshly cloned repo at master branch also pass for my pull-request.