Technology Stack:
- Tinkerpop Stack 2.4 (Rexster HTTP REST Server)
- Titan 0.5.4
- DynamoDB (AWS)
- NodeJS
Goal:
I would like to utilize the Rexster RESTful based API for querying and traversals of my graph database. I am trying to understand the _properties query parameter for filtering results based on Vertex Query syntax.
Result of Vertices Query:
http://localhost:8182/graphs/mygraph/vertices
{
"version": "2.5.0",
"results": [
{
"name": "Frank Stein",
"_id": 25600768,
"_type": "vertex"
},
{
"name": "John Doe",
"_id": 25600512,
"_type": "vertex"
}
],
"totalSize": 2,
"queryTime": 219.86688
}
Result of Edge Query:
http://localhost:8182/graphs/mygraph/vertices
{
"version": "2.5.0",
"results": [
{
"_id": "f8q68-f8phc-4is5-f8pog",
"_type": "edge",
"_outV": 25600512,
"_inV": 25600768,
"_label": "friends"
}
],
"totalSize": 1,
"queryTime": 164.384768
}
Problem:
These URI's do not return what I am assuming I would get returned, always return an empty set.:
Requests:
_http://localhost:8182/graphs/privvy/vertices/25600768/both?properties=[[name,=,"John Doe"]] _http://localhost:8182/graphs/privvy/vertices/25600768/both?properties=[[name,=,John Doe]] _http://localhost:8182/graphs/privvy/vertices/25600768/both?properties=[[name,=,(s,"John Doe")]] _http://localhost:8182/graphs/privvy/vertices/25600768/both?properties=[[name,=,(s,John Doe)]]
Response:
{
"version": "2.5.0",
"results": [],
"totalSize": 0,
"queryTime": 22.641152
}
Additional Information:
The following URI does return a resulting set of adjacent vertices if I just switch the = (equal operator) to the <> (not equal) operator:
Request:
_http://localhost:8182/graphs/privvy/vertices/25600768/both?properties=[[name,<>,"John Doe"]]
Response:
{
"version": "2.5.0",
"results": [
{
"name": "John Doe",
"_id": 25600512,
"_type": "vertex"
}
],
"totalSize": 1,
"queryTime": 17.451008
}
Anyone have any clue where I may be going wrong?
References:
- https://github.com/tinkerpop/rexster/wiki/Basic-REST-API
- https://github.com/tinkerpop/rexster/wiki/Property-Data-Types (Shows NO EXAMPLES of string use for data type Vertex Queries.)
- https://github.com/tinkerpop/blueprints/wiki/Vertex-Query
Thanks Friends!
Tom