Hey Binh, I tried your example and it does in fact work. I realized my query was just wrong...really stupid mistake. Thanks for your help!
On Wednesday, March 26, 2014 5:22:44 PM UTC-4, Binh Ly wrote: > > Hmmm, not sure. I just tried this and it works for me (ES 1.1): > > 1. PUT http://localhost:9200/n > { > "mappings": { > "doc": { > "properties": { > "n1": { > "type": "nested", > "properties": { > } > } > } > } > } > } > > 2) POST http://localhost:9200/n/doc > { "company_id": 123, "n1": { "name": "engineering" } } > > 3) POST http://localhost:9200/n/_search > { > "query": { > "filtered": { > "query": { > "match_all": {} > }, > "filter": { > "bool": { > "must": [ > { > "term": { > "company_id": 123 > } > }, > { > "nested": { > "filter": { > "term": { > "n1.name": { > "value": "engineering" > } > } > }, > "path": "n1" > } > } > ] > } > } > } > } > } > > And it returned the document fine. Maybe you can duplicate my steps and > see if it works for you. > -- 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/087014f1-0344-4cbd-8d3d-af370ae79ee6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
