Hi again.

I have another question about weak consistencyLevel.
according to the manual, s2graph has tow types of consistency level:strong, weak
I want to get several edges between two vertices, so, I set a weak consistency 
level.
after setting, I tried to get edges, but it returned only one edge like 
‘strong’ level.

What is wrong with my query?



here is my setting and queries.

————————————————————————————————————————————

1. create a service

curl -XPOST localhost:9000/graphs/createService -H 'Content-Type: 
Application/json' -d '
{"serviceName": "KakaoFavorites", "compressionAlgorithm" : "gz"}
‘


2. create a level

curl -XPOST localhost:9000/graphs/createLabel -H 'Content-Type: 
Application/json' -d '
{
  "label": "s2graph_label_test_weak",
  "srcServiceName": "KakaoFavorites",
  "srcColumnName": "userName",
  "srcColumnType": "string",
  "tgtServiceName": "KakaoFavorites",
  "tgtColumnName": "userName",
  "tgtColumnType": "string",
  "isDirected": "true",
  "indices": [],
  "props": [ 
  {"name": "time", "defaultValue": 0, "dataType": "long"}
  ],
  "consistencyLevel": "weak"
}
‘


3. insert edges with meta data

curl -XPOST localhost:9000/graphs/edges/insert -H 'Content-Type: 
Application/json' -d'
[
{"timestamp": 1, "from": 101, "to": 10, "label": "s2graph_label_test_weak", 
"props": {"time": 0}},
{"timestamp": 2, "from": 101, "to": 10, "label": "s2graph_label_test_weak", 
"props": {"time": -10}},
{"timestamp": 3, "from": 101, "to": 10, "label": "s2graph_label_test_weak", 
"props": {"time": -30}}
]
'



4. query id “101” and direction “out”

curl -XPOST localhost:9000/graphs/getEdges -H 'Content-Type: Application/json' 
-d '
{
    "srcVertices": [{"serviceName": "KakaoFavorites", "columnName": "userName", 
"id":"101"}],
    "steps": [
      {"step": [{"label": "s2graph_label_test_weak", "direction": "out", 
"offset": 0, "limit": 100}]}
    ]
}
‘


5. it returns like this

=======================================
[true,true,true]vagrant@vagrant-ubuntu-trusty-64:~$ 
vagrant@vagrant-ubuntu-trusty-64:~$ 
vagrant@vagrant-ubuntu-trusty-64:~$ curl -XPOST localhost:9000/graphs/getEdges 
-H 'Content-Type: Application/json' -d '
> {
>     "srcVertices": [{"serviceName": "KakaoFavorites", "columnName": 
> "userName", "id":"101"}],
>     "steps": [
>       {"step": [{"label": "s2graph_label_test_weak", "direction": "out", 
> "offset": 0, "limit": 100}]}
>     ]
> }
> '

{"size":1,"degrees":[{"from":"101","label":"s2graph_label_test_weak","direction":"out","_degree":3}],"results":[{"cacheRemain":-636,"timestamp":3,"score":1.0,"label":"s2graph_label_test_weak","direction":"out","to":"10","_timestamp":3,"from":"101","props":{"_timestamp":3,"_count":-1,"time":-30}}]}

=======================================



Reply via email to