title: Rails Elasticsearch-model model mapping - raw and not_analyzed
body: <p>I am using the Elasticsearch-rails gem in my application.  I need my index mapping in the model to look like the JSON you see below (shortened only to include only relevant pieces).  The part I don't understand relates to "name."  How would that mapping be setup if this is what I need it to look like?</p>
  
  <p>JSON Mapping I want to Rails model to output</p>
  
  <pre><code>{  
     "recipes":{  
        "mappings":{  
           "list":{  
              "dynamic":"false",
              "properties":{  
                 "creator_name":{  
                    "type":"string"
                 },
                 "name":{  
                    "type":"string",
                    "fields":{  
                       "raw":{  
                          "type":"string",
                          "index":"not_analyzed"
                       }
                    }
                 },
                 "permalink":{  
                    "type":"string"
                 },
                 "user_id":{  
                    "type":"string"
                 }
              }
           }
        }
     }
  }
  </code></pre>
  
  <p>Current Rails model mapping</p>
  
  <pre><code>  settings :index =&gt; { :number_of_shards =&gt; 1  } do
      mapping :dynamic =&gt; 'false' do
        indexes :user_id, :type =&gt; 'string'
        indexes :permalink, :type =&gt; 'string'
        indexes :creator_name, :type =&gt; 'string'
        indexes :name, :type =&gt; 'string' # How do i make this match the json?
      end
    end
  </code></pre>
  
  <p>How do I set indexing for 'name' in the model to look like the JSON?</p>
  
  <p>Thanks a lot!</p>