title: Elasticsearch: how to search a user_defined field?
body: <p>I use mysql to store user data, and search the data by Elasticsearch. For mysql, I have a user defined field, this field can store a JSON format data. </p>
  
  <p>the example data like this:</p>
  
  <pre><code>data1 = 
  {
  "name" : "test1",
  "age": 10,
  "user_defined": {
    "a" : "aaa",
    "b" : "bbb",
    "c" : "ccc",
    .....
    }
  }
  
  data2 = 
  {
  "name" : "test2",
  "age": 20,
  "user_defined": {
    "d" : "ddd",
    "e" : "eee",
    "f" : "fff",
    .....
    }
  }
  </code></pre>
  
  <p>For user_defined field, the number of keys is not fixed, the type of values all are string, I hope each key can be searched, how to define the mapping? how to search this kind of data by Elasticsearch?</p>
  
  <p>Anyone has good idea?</p>