title: Elasticsearch: _id based on document field?
body: <p>I am new to Elasticsearch. I have difficulty in using a field of the document for <code>_id</code>. Here is my mapping:</p>
  
  <pre><code>{
    "product": {
      "_id": {
        "path": "id"
      },
      "properties": {
        "id": {
          "type": "long",
          "index": "not_analyzed",
          "store": "yes"
        },
        "title": {
          "type": "string",
          "analyzer": "snowball",
          "store": "no",
          "index": "not_analyzed"
        }
      }
    }
  }
  </code></pre>
  
  <p>Here is a sample document:</p>
  
  <pre><code>{
    "id": 1,
    "title": "All Quiet on the Western Front"
  }
  </code></pre>
  
  <p>When indexing this document, I got something like:</p>
  
  <pre><code>{
    "_index": "myindex",
    "_type": "book",
    "_id": "PZQu4rocRy60hO2seUEziQ",
    "_version": 1,
    "created": true
  }
  </code></pre>
  
  <p>Did I do anything wrong? How should this work?</p>