title: elasticsearch wildcard search with and operator
body: <p>I am developing an application that uses elastic search, and in some case I want to make a search that according to term and locales. I am testing this on localhost</p>
  
  <pre><code>http://localhost:9200/index/type/_search
  </code></pre>
  
  <p>and parameters</p>
  
  <pre><code>query : {
                          wildcard : { "term" : "myterm*" }
                      },
                      filter : {
                          and : [
                              {
                                  term : { "lang" : "en" }
                              },
                              {
                                  term : { "translations.lang" : "tr" } //this is subdocument search
                              },
                          ]
                      }
  </code></pre>
  
  <p>Here is an example document:</p>
  
  <pre><code>{
      "_index": "twitter",
      "_type": "tweet",
      "_id": "5084151d2c6e5d5b11000008",
      "_score": null,
      "_source": {
        "lang": "en",
        "term": "photograph",
        "translations": [
          {
            "_id": "5084151d2c6e5d5b11000009",
            "lang": "tr",
            "translation": "fotoğraf",
            "score": "0",
            "createDate": "2012-10-21T15:30:37.994Z",
            "author": "anonymous"
          },
          {
            "_id": "50850346532b865c2000000a",
            "lang": "tr",
            "translation": "resim",
            "score": "0",
            "createDate": "2012-10-22T08:26:46.670Z",
            "author": "anonymous"
          }
        ],
        "author": "anonymous",
        "createDate": "2012-10-21T15:30:37.994Z"
      }
    }
  </code></pre>
  
  <p>I am trying to get terms with wildcard(for autocomplete) with input language "en", and output language "tr". It is getting terms that has "myterm" but doesnt apply, and operation on this. Any suggestion would be appreciated</p>
  
  <p>Thanks in advance</p>