Moved from GitHub tutorial/32
Posted by kortschak:
It’s very unclear what the example on p13 of the blocksvar section is getting at - this could be improved by adding some more explanatory text. Additionally, contrary to the claim by the explanation, picking another director who has acted (Peter Jackson), gives essentially exactly the same form of result; all the results are director.film
.
Interestingly, the query that is there does not return the name
value that should exist when expanding the predicates of Cherie Nowlan. A similar situation is shown here:
{
th(func:allofterms(name@en, "Tom Hanks")) { # actor and director
pred as _predicate_
}
q(func:allofterms(name@en, "Peter Fitzgerald")) { # actor only
expand(val(pred)) { expand(_all_) }
}
}
results in
{
"data": {
"th": [
{
"_predicate_": [
"name",
"director.film",
"actor.film"
]
}
],
"q": []
},
"extensions": {
"server_latency": {
"parsing_ns": 28167,
"processing_ns": 14008804,
"encoding_ns": 864274
},
"txn": {
"start_ts": 50132,
"lin_read": {
"ids": {
"1": 193224
}
}
}
}
}
Note that only director.film
predicates are followed.