Query string for nested field in elasticsearch ( how to make AND work?)
<p>I am trying to hit a query string on a nested field <code>abc.answer</code> which does not use any analyzer. Here is the query I am using:</p>

<pre><code>   {
  "query": {
      "nested":{
           "path": "abc",
           "query":{
    "query_string": {
      "query": "photo AND delhi",
      "fields": ["answer"]



    }
    },
     "inner_hits": {
          "explain": true
      }

  }
  },
  "explain" : true,
  "sort" : [ {
    "_score" : { }
  } ]
}
</code></pre>

<p>I want to search for the document which has both <code>dtp operator</code> and <code>bangalore</code> in the nested field <code>abc</code>. But it is not showing any results. </p>

<p>My nested field structure :</p>

<pre><code>"abc": [
            {
              "updatedAt": 1452073190000,
              "questionId": 1,
              "labelOriginal": "name",
              "createdAt": 1452073190000,
              "answerOriginal": "wexe",
              "answer": "wexe",
              "answerId": 0,
              "label": "name",
              "question": "what is your name?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 2,
              "labelOriginal": "mobile",
              "createdAt": 1452073190000,
              "answerOriginal": "9000000000",
              "answer": "9000000000",
              "answerId": 0,
              "label": "mobile",
              "question": "What is your mobile number?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 3,
              "labelOriginal": "email id",
              "createdAt": 1452073190000,
              "answerOriginal": "legallss@yahoo.com",
              "answer": "legallss@yahoo.com",
              "answerId": 0,
              "label": "email Id",
              "question": "What is your e-mail id ?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 4,
              "labelOriginal": "current role",
              "createdAt": 1452073190000,
              "answerOriginal": "dtp operator",
              "answer": "DTP Operator",
              "answerId": 597,
              "label": "current role",
              "question": "What is your current role?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 5,
              "labelOriginal": "city",
              "createdAt": 1452073190000,
              "answerOriginal": "bangalore",
              "answer": "Bangalore",
              "answerId": 23,
              "label": "city",
              "question": "Which city do you live in ?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 6,
              "labelOriginal": "locality",
              "createdAt": 1452073190000,
              "answerOriginal": "80 ft. road",
              "answer": "80 Ft. Road",
              "answerId": 0,
              "label": "locality",
              "question": "Which locality do you live in ?"
            },
            {
              "updatedAt": 1452073190000,
              "questionId": 13,
              "labelOriginal": "job type",
              "createdAt": 1452073190000,
              "answerOriginal": "part time jobs",
              "answer": "Part Time Jobs",
              "answerId": 64,
              "label": "Job Type",
              "question": "Are you comfortable with working Full Time or Part Time?"
            },
            {
              "labelOriginal": "userDesiredCity",
              "answerOriginal": "bangalore",
              "answer": "Bangalore",
              "answerId": 23,
              "label": "userDesiredCity"
            }
</code></pre>