title: How to specify an analyzer and achieve mapping in ElasticSearch?
body: <p>I want to define an analyzer and of course applicate it in my DB elasticsearch</p>
  
  <p>My analyzer seems working, when I test it on a random word it works correctly !</p>
  
  <p>But it isn't the case with mapping step ! </p>
  
  <p>Mapping query looks like :</p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>{
    "properties": {
      "es_lib_entite": { 
        "type":           "string",
        "analyzer":       "standard",
        "fields": {
          "tosynonym": { 
            "type":       "string",
            "analyzer":   "folding"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>as u can see Analyzer's name is "folding"</p>
  
  <p>and the content of mapping seems correct ! it returns </p>
  
  
  
  <pre class="lang-html prettyprint-override"><code>"es_lib_entite":{
      "type":"string",
      "search_analyzer":"standard",
      "fields":{
         "folded":{
          "type":"string",
          "analyzer":"folding"
          }
      }
  },
  </code></pre>
  
  <p>but when I check the content of es_lib_entite with _search it returns null ! I don't why knowing that I'm pretty new to elasticsearch </p>