Here is the sample data

"hits" : [


 {
      "_index" : "myIndex",
      "_type" : "sellItemsIndices",
      "_id" : "4ks8w",
      "_score" : 1.0,
      "_source":{"sellAdState":"Karnataka"}
 }

   {
      "_index" : "myIndex",
      "_type" : "laptopIndices",
      "_id" : "4ks8w",
      "_score" : 1.0,
      "_source":{"laptopModelId":"Vostro"}
    }

now i want to execute below query

    laptopModelId:"Vostro" AND sellAdState:"Karnataka"

Here is the java code that returns nothing 

        SearchResponse response = client.prepareSearch("myIndex")
        .setTypes("laptopIndices","sellItemsIndices")
        .setQuery(QueryBuilders.queryString("laptopModelId:\"Vostro\" AND 
sellAdState:\"Karnataka\""))
        .execute()
        .actionGet();  


-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/e3c964d3-bb12-4c2f-8429-715c6457b913%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to