hi , the problem is i want to return range of value of a path that are the same with 4 other items , here is the query:
GET composition_value/composition/_search
{
"query": {
"nested": {
"path": "value",
"query": {
"bool": {
"must": [
{"match": {"value.composition.content.data.events.data.items.name.value": "systolic"}},
{"range": {"value.composition.content.data.events.data.items.value.magnitude": {"gte": 10,"lte": 40}}}
]
}
}
}
}
}
And the document that i search in it ,is like this :
"items": [{
"name": {
"value": "Systolic"
> },
> "value": {
> "magnitude": "70",
> "units": "cm[Hg]",
> "_xsi:type": "DV_QUANTITY"
> },
> "_archetype_node_id": "at0004",
> "_xsi:type": "ELEMENT"
> },
{
"name": {
"value": "Diastolic"
},
"value": {
"magnitude": "80",
"units": "cm[Hg]",
"_xsi:type": "DV_QUANTITY"
},
"_archetype_node_id": "at0005",
"_xsi:type": "ELEMENT"
},
{
"name": {
"value": "Mean Arterial Pressure"
},
"value": {
"magnitude": "615",
"units": "mm[Hg]",
"_xsi:type": "DV_QUANTITY"
},
"_archetype_node_id": "at1006",
"_xsi:type": "ELEMENT"
},
{
"name": {
"value": "Pulse Pressure"
},
"value": {
"magnitude": "324",
"units": "mm[Hg]",
"_xsi:type": "DV_QUANTITY"
},
"_archetype_node_id": "at1007",
"_xsi:type": "ELEMENT"
},
{
"name": {
"value": "Comment"
},
"value": {
"value"sasd3213",
"_xsi:type": "DV_TEXT"
},
"_archetype_node_id": "at0033",
"_xsi:type": "ELEMENT"
}],
"_archetype_node_id": "at0003",
"_xsi:type": "ITEM_TREE"
}
And i want to check range of "value.magnitude" of "systolic" not items "diastolic , 2 other items"
i want to filter the first item with "_archetype_node_id" attribute that point to "at0004"
tanks