Skip to content

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

@baozengkai

Description

@baozengkai

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions