Folks,
I have defined a nested object with multi_fields attribute: the "cat" in 
store_purchase


I loaded some data into Es:
 {
            "_index": "user_activity_v2",
            "_type": "combined",
            "_id": "1229369",
            "_score": 1,
            "_source": {
               "store_purchase": [
                  {
                     "item_id": "10423846",
                     "subcat": "First Aid",
                     "brand_name": "brand name",
                     "event_time": "2015-03-09",
                     "cat": "otc"
                  },
                  {
                     "item_id": "34897214",
                     "subcat": "coffee",
                     "brand_name": "brand name2",
                     "event_time": "2015-03-09",
                     "cat": "cat2 with space"
                  },
}

However, I cannot find any data from the following search

GET _search
{
  "query": {
    "bool": {
      "must": [
       
        {
          "nested": {
            "path": "store_purchase", 
            "query": {
              "bool": {
                "must": [ 
                  { "match": { "store_purchase.cat": "otc" }}
                ]
        }}}}
      ]
}}}

i also tried with    { "match": { "store_purchase.cat.original": "otc" }}, 
it all returns nothing.

What I am missing here?
Thanks,
Chen


-- 
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/7802f86f-fde6-4502-9e76-3c9347ba618a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to