We are using graph extension in Kibana to visualize relation between people, we have the following table in elasticsearch with Person1 as the index :
Person1 Person2 Score
A B 2
A C 3
C A 1
If we visualize the data in Kibana-Graph then we will have a A with two relation with B and C and another node C with a relationship to A. (we will have basically two graph because C is considered as a new node).
How can we have only one graph with all the relationship ?
It can be part of the mapping (think of it as a schema) for the index.
In this example [1] the source documents only contain first_name and last_name values but they are automatically copied into an index field called full_name. You can do the same trick with your person1 and person2 fields into a person field.
Your Hive code doesn't have to change - only the mapping used for the index you load the data into.
In elastic Graph single edges represent a collection of documents that contain a pair of terms. An edge could represent a billion documents, or as in your case, it could be just one.
When you want to view properties of an edge you can use the search API to retrieve individual documents or perhaps use the "aggregations" feature to summarise properties of many docs e.g. show a line graph of volumes of transactions between 2 accounts over time. The next version of the Graph UI [1] provides "drill-down" features which make these calls for you and provide visualizations.
I'm not sure what data/approach you use to compute your scores in advance but it is worth noting that elastic Graph can derive scores on-the-fly from raw data e.g. looking at StackOverflow posts it can summarise who is strongly connected with who based on the volumes of exchanges on StackOverflow over time. We use this to prioritise which connections to explore first.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.