title: Elasticsearch relationship mappings (one to one and one to many)
body: <p>In my elastic search server I have one index <code>http://localhost:9200/blog</code>.<br>
  The (blog) index contains multiple types.</p>
  
  <p>e.g.: <code>http://localhost:9200/blog/posts</code>, <code>http://localhost:9200/blog/tags</code>.</p>
  
  <p>In the tags type I have created more than 1000 tags and 10 posts created in posts type.</p>
  
  <p>e.g.: posts</p>
  
  <pre><code>{   
      "_index":"blog",
      "_type":"posts",
      "_id":"1",
      "_version":3,
      "found":true,
      "_source" : {
          "catalogId" : "1",
         "name" : "cricket",
         "url" : "http://www.wikipedia/cricket"
      }
  }
  </code></pre>
  
  <p>e.g.: tags</p>
  
  <pre><code>{   
      "_index":"blog",
      "_type":"tags",
      "_id":"1",
      "_version":3,
      "found":true,
      "_source" : {
          "tagId" : "1",
          "name" : "game"
      }
  }
  </code></pre>
  
  <p>I want to assign the existing tag to blog posts (i.e. relationship => mapping).</p>
  
  <p>How do I assign the tags to posts mapping?</p>