title: Elasticsearch. Nested field type and raw string subfield
body: <p>I has mapping:</p>
  
  <pre>
  
      {
         "properties":{
            <i>/*some fields ommited*/,</i>
            "properties":{
               "type":"nested",
               "properties":{
                  "FieldA":{
                     "type":"string",
                     "fields":{
                        "raw":{
                           "index":"not_analyzed",
                           "type":"string"
                        }
                     }
                  }
               }
            }
         }
      }
  
  </pre>
  
  <p>and some documents:</p>
  
  <pre>
  
      {
        <i>/*some fields ommited*/,</i>
         "properties":{
            "FieldA":"one"
         }
      }
  
      {
        <i>/*some fields ommited*/,</i>
         "properties":{
            "FieldA":"two"
         }
      }
  
  </pre>
  
  <p>and so on.</p>
  
  <p>I try to make query:</p>
  
  <pre>
  
      {
        "query": {
          "nested": {
            "query": {
              "term": {
                "FieldA.raw": "one"
              }
            },
            "path": "properties"
          }
        }
      }
  
  </pre>
  
  <p>There are no results found. If i try to use the same query by field with other type (not string, and without <strong>raw</strong> subfield) it works. How should i write query for that case? Thanks!</p>
  
  <p>P.S. field "FieldA" has subfield <strong>raw</strong> because i need this field to be analyzed and not analyzed at the same time</p>