Skip to content
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

Unipop graph.edge.count does not return correct result #115

Open
baozengkai opened this issue Nov 16, 2017 · 6 comments
Open

Unipop graph.edge.count does not return correct result #115

baozengkai opened this issue Nov 16, 2017 · 6 comments

Comments

@baozengkai
Copy link

Hi, My Elasticsearch has 3170000 documents. And I want to mapping this document to edge.My Elasticsearch documents like this:
{ "_index" : "company", "_type" : "data", "_id" : "AV9RS_qd695UKO_41Ei9", "_score" : 1.0, "_source" : { "time" : "January 02 2017 18:11:46.000", "document" : "XXX.docx", "user" : "XX" "userId" : XXX, "documentId" : XXX, "action" : "open", }
I use tinkerpop-server+unipop to do the graph search.My unipop mapping json like this:
` {
"class": "org.unipop.elastic.ElasticSourceProvider",
"clusterName": "elasticsearch",
"addresses": "http://localhost:9201",
"vertices": [
{
"index": "company",
"id": "@userid",
"label": "user",
"properties": {
"name": "@user"
},
},
{
"index": "company",
"id": "@documentid",
"label": "document",
"properties": {
"name": "@document"
},
}
],

"edges": [
{
"index": "company",
"id": "@_id",
"label": "@action",
"properties": {
"time": "@time",
"action": "@action",
},
"dynamicProperties": true,
"outVertex": {
"ref": true,
"id": "@userid",
"label": "user"
},
"inVertex": {
"ref": true,
"id": "@documentid",
"label": "document"
}
}
]
}
But when I test by following code:

BaseConfiguration conf = new BaseConfiguration();
conf.addProperty("providers","/company/tinkerpop-server/json");
UniGraph graph=UniGraph.open(conf);
GraphTraversalSource g=graph.traversal();
System.out.println(g.E().count().toList());

It shows me the count result is 10000 rather than 3170000,I hope to understand what’s strange thing going on?

@seanbarzilay
Copy link
Member

This is a known issue Scroll api I'm hoping finish working on it in the next few days. @baozengkai

@baozengkai
Copy link
Author

@seanbarzilay Understand, looking forward to better unipop

@sorryya
Copy link

sorryya commented Nov 17, 2017

From a performance perspective, is it better to use Count api in a count step strategy, rather than Scroll api? @seanbarzilay

@seanbarzilay
Copy link
Member

I am aware of that but currently I don't have any Reducing step strategies. #46

@sorryya
Copy link

sorryya commented Nov 17, 2017

I see. So is there any definite time plan for the Reducing step strategies ? I'm really looking forward to it.

@seanbarzilay
Copy link
Member

I'm hoping I can get it done by the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants