title: ElasticSearch composite ID
body: <p>I am using elasticsearch-py to insert data. Currently, my <code>_id</code> field is something like this:</p>
  
  <pre><code>_id: "{'hostname': 'xxxxx', 'day': '2016-03-22', 'service': 'xxxxxxxx'}"
  </code></pre>
  
  <p>My manager told me this is not a good id. I think it's ok.
  With ElasticSearch, can i have an id composed of several attributes ?</p>
  
  <p>Eg: </p>
  
  <pre><code>_id: {
      hostname: "xxxxxx",
      day: "2016-03-22",
      service: "xxxxxxxx"
  }
  </code></pre>
  
  <p>A second solution is to encode my string in base64 with python. </p>