I am trying to execute the following query.
Find sensors with temperature “6.0”^^http://www.w3.org/2001/XMLSchema#float
So in dgraph I wrote:-
{
yo(func:has(name)) {
name
type@filter(eq(name,"TemperatureObservation")){
}
result@filter(eq(floatValue, 6.0)){
name
floatValue
}
}
}
Below is the result for the query. The first three nodes do not contain result predicate, yet they are returned. Result should only contain the nodes which have type = TemperatureObservation and result.floatValue = 6.0. What am I doing wrong?
{
"data": {
"yo": [
{
"name": "MeasureData_WindDirection_4UT01_2004_8_9_18_30_00"
},
{
"name": "Observation_WindGust_4UT01_2004_8_10_14_50_00"
},
{
"name": "Observation_AirTemperature_4UT01_2004_8_13_13_35_00"
},
{
"name": "Observation_WindGust_4UT01_2004_8_10_6_55_00",
"result": [
{
"name": "MeasureData_WindGust_4UT01_2004_8_10_6_55_00",
"floatValue": 6
}
]
}