title: not_analyzed for a nested type on ElasticSearch?
body: <p>i have a problem regarding performing facet search on a nested object.</p>
  
  <p>Take for example i have the following document:</p>
  
  <pre><code>tags: [
     {
         tag: "tag0",
         tag_url: "http://xxxxxxx.com/tag/tag0/"
     },
     {
         tag: "tag1",
         tag_url: "http://xxxxxx.com/tag/tag1/"
     }
  ],
  
  categories: [
      {
          category: "cat0",
          category_url: "http://xxxxxx.com/category/cat0/"
      },
      {
          category: "cat1",
          category_url: "http://xxxxxx.com/category/cat1/"
      }
  ],
  </code></pre>
  
  <p>and i want to perform a facet on <code>tags.tag</code> and <code>tags.tag_url</code></p>
  
  <p>And so i what mapping do i use in order to create <code>index:not_analyzed</code> for the nested fields ?</p>
  
  <p>I have tried this mapping:</p>
  
  <pre><code>    mapping_data[mapping_name]["properties"] = {
          "tags.tag" : {
              "type": "multi_field",
                  "fields" : {
                      "tags.tag": {"type" : "string", "index" : "analyzed", "store": "yes"},
                      "untouched" : {"type" : "string", "index" : "not_analyzed"}
                  }
          },
          "tags.tag_url" : {
              "type": "multi_field",
                  "fields" : {
                      "tags.tag_url": {"type" : "string", "index" : "analyzed", "store": "yes"},
                      "untouched" : {"type" : "string", "index" : "not_analyzed"}
                  }
          },
          "categories.category" : {
              "type": "multi_field",
                  "fields" : {
                      "categories.category": {"type" : "string", "index" : "analyzed", "store": "yes"},
                      "untouched" : {"type" : "string", "index" : "not_analyzed"}
                  }
          }, 
          "categories.category_url" : {
              "type": "multi_field",
                  "fields" : {
                      "categories.category_url": {"type" : "string", "index" : "analyzed", "store": "yes"},
                      "untouched" : {"type" : "string", "index" : "not_analyzed"}
                  }
          },
  
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>mapping_data[mapping_name]["properties"] = {
          "tags" : {
              "type": "nested"
          },
  
          "categories" : {
              "type": "nested"
          }, 
  }
  </code></pre>
  
  <p>But it does not give me the required result.</p>
  
  <p>Using <code>type:nested</code>, still tokenizes the nested field, while <code>type: multi_field</code> cannot be expressed such that the nested field is <code>not_analyzed</code>. ( note that i used <code>tags.tag</code> in the <code>multi_field</code> variation, but to no avail. )</p>
  
  <p>So, how to i express the mapping to achieve facet for nested documents ?</p>
  
  <p>PS: <a href="http://www.elasticsearch.org/guide/reference/mapping/nested-type/" rel="nofollow">http://www.elasticsearch.org/guide/reference/mapping/nested-type/</a> and <a href="http://www.elasticsearch.org/guide/reference/mapping/nested-type/" rel="nofollow">http://www.elasticsearch.org/guide/reference/mapping/nested-type/</a> did not produce the outcome i need as i do not have the value_field.</p>