Closed HyunsungJo closed 8 years ago
Think of an S2AB bucket defined as below:
{ "srcVertices": [ { "serviceName": "some_service", "columnName": "article_id", "id": [[doc_id]] } ], "steps": [ { "step": [ { "label": "similar_articles", "direction": "out", "offset": 0, "limit": 10, "where": "is_blacklisted_article=false and article_id != [[doc_id]]" } ] } ] }
According to the current spec, client will make the following call:
curl -XPOST http://graph-query.iwilab.com:9000/graphs/experiment/{app key}/{experiment name}/{uuid} -H 'Content-Type: Application/json' -d ' { "[[doc_id]]": "some-string-id" } '
And this will return an error due to nested double quotes in the "where" field.
"where"
"where": "is_blacklisted_article=false and article_id != "some-string-id""
Everyone would be happy if
[[doc_id]]
some-string-id
"some-string-id"
{ "srcVertices": [ { "serviceName": "some_service", "columnName": "article_id", "id": "[[doc_id]]" <=== quotation marks added! } ], "steps": [ { "step": [ { "label": "similar_articles", "direction": "out", "offset": 0, "limit": 10, "where": "is_blacklisted_article=false and article_id != [[doc_id]]" } ] } ] }
:+1:
Problem
Think of an S2AB bucket defined as below:
According to the current spec, client will make the following call:
And this will return an error due to nested double quotes in the
"where"
field.Solution
Everyone would be happy if
[[doc_id]]
is replaced withsome-string-id
instead of"some-string-id"
(without the quotation marks..),