Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

only return inner hits from nested objects

POST /networkcollection/branch_routers/_search/
{
  "_source" : false,
  "query": {
    "nested": {
      "path": "queries",
      "query": {
        "bool": {
          "must": [
            { "match": 
              { "queries.dateQuery": "20160101T200000.000Z" }
            }
          ]
        }
      },
      "inner_hits" : {}
    }
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #hits #nested #objects
ADD COMMENT
Topic
Name
9+5 =