Comments (3)
@sorryya Did you mean this kind of mapping Inner Edges?
from unipop.
I mean:
Elastic document like this:
{
"_index": "xxx",
"_type": "yyy",
"_id": "AV-VSXTUbcKGrP6qekMg",
"_source": {
"field_1": "1111",
"field_2": "2222",
"field_3": "3333",
"field_4": "4444",
"field_5": "5555",
"field_6": "6666",
"field_7": "7777",
"field_8": "8888",
"field_9": "9999"
}
}
My scene:
- Each document represents a event, and I want to model a graph about cooccurrence relations of the objects in the event.
- Some fields about the event are for edges, some fields about the objects are for vertices.
- So, one field may be as an id or a property for several edges or vertices, a field as vertex id may have duplicate value in documents.
- The "id" may be combined by a set of fields.
- The "index" should be all indexes or some indexes in elasticsearch.
Can Mapping file be like this?
{
"class": "org.unipop.elastic.ElasticSourceProvider",
"clusterName": "escluster",
"addresses": "http://localhost:9200",
"edges": [
{
"index": "*",
"id": {
"fields": ["some_value", "@_id"],
"delimiter": "+"
},
"label": "lable_e1",
"properties": {
"field_1": "@field_1",
"field_2": "@field_2",
"field_3": "@field_3"
},
"outVertex":{
"ref": false,
"id": "@field_4",
"label": "lable_v1",
"properties": {
"field_5": "@field_5"
}
},
"inVertex":{
"ref": false,
"id": {
"fields": ["@field_6", "@field_7"],
"delimiter": "+"
},
"label": "lable_v2",
"properties": {
"property_name": {
"fields": ["@field_6", "@field_7"],
"delimiter": "+"
},
}
}
},
{
"index": "*",
"id": "@_id",
"label": "lable_e2",
"properties": {
"field_1": "@field_1",
"field_2": "@field_2",
"field_5": "@field_4",
"field_7": "@field_8",
},
"outVertex":{
"ref": false,
"id": "@field_4",
"label": "lable_v3",
"properties": {
"field_5": "@field_5"
}
},
"inVertex":{
"ref": false,
"id": "@field_9",
"label": "lable_v4",
"properties": {
"field_9": "@field_9"
}
}
}
]
}
In this case, here are the problems I have met:
- If I use "ref" as false in "outVertex" or "inVertex", it throws:java.lang.NullPointerException.
- The count of edges I queried is much less than it actually is, which g.E().count() got 9881, but the elastic documents count is 7242721.
- If I define vertices all within edges in mapping file, the count of vertices I got is 0 use g.V().count().
- If I defind vertices as independent ones(not within edges), the count of vertices I got is much less than it actually is, which g.V().values("field_4").count() got 251, but the distinct count of field_4 (as the vertex's id and property) in elasticsearch is 753.
- When I use the fuction "has(...)" to query, I got nothing.
from unipop.
@sorryya I haven't tested a schema where both vertices are non reference vertices, so I will fix it and release a patch in the next few days.
from unipop.
Related Issues (20)
- group bug
- path finder
- Profile bug
- How to write conf content in coding HOT 4
- Failed in adding vertex to elastic graph HOT 1
- Documentation for unipop configuration / providers file HOT 4
- Failed with gremlin traversal on Edge operation HOT 4
- Unipop graph.edge.count does not return correct result HOT 6
- g.V().hasLabel("USER").limit(2).id().toList() can't work HOT 6
- Can unipop support multi mappings for different graph models running at the same time? HOT 5
- Will unipop support in-memory gremlin providers like redis? HOT 1
- Status of module-level unit tests
- A quick start guide HOT 4
- Error:org.unipop.jdbc.JdbcSourceProvider not found
- Can unipop support graph from multi data sources ? HOT 1
- Does unipop support distributed clustering? or is it just a single machine application? HOT 1
- Unipop Elasticsearch plugin working only on 10000 docuements HOT 30
- Elasticsearch - Ids of nested edges and vertices
- Repository: Wiki is editable by anyone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unipop.