title: ElasticSearch not returning results for terms query against string property
body: <p>I have the following indexed document:</p>
  
  <pre><code>{
      "visitor": {
          "id": &lt;SOME STRING VALUE&gt;
      }
  }
  </code></pre>
  
  <p>The mapping for the document is:</p>
  
  <pre><code>"visitor": {
      "properties": {
          "id": {
              "type": "string"
           }
       }
   }
  </code></pre>
  
  <p>When I run the following query I get results:</p>
  
  <pre><code>{
      "query": {
          "filtered": {
              "query": {
                  "match_all": {}
               }
          },
          "filter": {
              "term": { "visitor.id": "123" }
          }
      }
  }
  </code></pre>
  
  <p>However this does not:</p>
  
  <pre><code>{
      "query": {
          "filtered": {
              "query": {
                  "match_all": {}
               }
          },
          "filter": {
              "term": { "visitor.id": "ABC" }
          }
      }
  }
  </code></pre>
  
  <p>I've been thinking this is related to analyzers and have been chasing that down. I've also been wondering if I was wrong to use dot notation to get to the nested visitor property.</p>
  
  <p><strong>Can anyone tell me why I can't filter for the visitor with the id of "ABC" but can for visitor 123</strong></p>