-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anyofterms does not work for facet created by JSON mutation #2867
Comments
Could you post a sample of the query you're trying to run? That will help determine if there's an issue. Thanks. |
Qry:
-> no result If i just use eq WRITE (which is the value set for the facet) it works:
-> Result:
And, still, the first query DOES work, but only if the mutation for the facet was done in ratel in RDF-style. Code to create the mutation:
Go structs:
Code to create the mutation from ratel in RDF style: |
I'm able to reproduce this by running a JSON mutation and NQuad mutation in dgo. Code: https://play.golang.org/p/k6DBNXuiuHu Output:
|
It seems to be a bug in the JSON parser. You can test with your query: {set {
_:x1 <access.to> _:x2 (permission="WRITE",inherit=false) .
}} JSON: {"set": {
"uid": "_:x1",
"access.to": {
"uid": "_:x2",
"access.to|inherit": false,
"access.to|permission": "WRITE"
}
}} |
@gitlw fixed a similar issue recently, where we were not parsing the facets correctly in one of the code paths. Lucas: Can you have a look? |
If you suspect this could be a bug, follow the template.
What version of Dgraph are you using?
tried latest "latest" @ dockerhub and v1.0.12-rc1
Have you tried reproducing the issue with latest release?
Yes
What is the hardware spec (RAM, OS)?
16gb, linux
Steps to reproduce the issue (command/config used to run Dgraph).
Create any facet with a string value.
Query filter it with anyofterms
Expected: i can filter with anyofterms, so e.g. if the value of the facet is "READ" and i filter for anyofterms(permission, "READ WRITE"), i will get a result
Actual:
well, anyofterms does not work. the value is not returned. i can only use eq.
BUT! This is only the case if i performed the mutation for this facet with the JSON API (from dgo). If i do it with the RDF syntax in ratel, it works!
The text was updated successfully, but these errors were encountered: