-
Notifications
You must be signed in to change notification settings - Fork 7
$root keyword problem #13
Copy link
Copy link
Open
Labels
Description
Hello, I'm having an issue with using the $root keyword. Here is my code:
var source = { "data": { "items": [ {"item": "one"}, {"item": "two"} ] } }
var template = { "query": { path: "data.items", nested: { "item": { path: "$item" } } } }
As a mapping result I will get this:
{ "query": [{ "term":{"item":"one} }, { "term":{"item":"two"} }] }
But when I change in the template 'path: "data.items"' to 'path: "$root.data.items"', I will get this:
{ "query": { "term": [ {"term":{"item":"one}}, {"term":{"item":"two"}} ] } }
So there is a strange behavior of the $root keyword.
Reactions are currently unavailable