title: Elasticsearch mapping for object with dynamic keys
body: <p>I have simple document with this mapping:</p>
  
  <pre class="lang-js prettyprint-override"><code>'product': {
    'properties': {
      'name': { 'type': 'string' },
      'shops': { 
        'type': 'object', 
        'index_name': 'shop', 
        'properties': {
          'name': { 'type': 'string' },
          'url': { 'type': 'string' },
          'price': { 'type': 'integer' },
        }
      }
    }
  }
  </code></pre>
  
  <p>Document look like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>{ 
    'name': 'Kindle', 
    'shops': [ 
      { 'name': 'amazon', 'url': 'http://...', 'price': 79 },
      { 'name': 'ebay', 'url': 'http://...', 'price': 99 }
  }
  </code></pre>
  
  <p>But I want store documents in this format:</p>
  
  <pre class="lang-js prettyprint-override"><code>{
    'name': 'Kindle',
    'shops': {
      'amazon': { 'url': 'http://...', 'price': 79 },
      'ebay': { 'url': 'http://...', 'price': 99 }
    }
  }
  </code></pre>
  
  <p>Is there any way to do mapping for this? Or I should create only object 'shops' and keep it schema-less.  </p>