Graph Query across documents

I have the data for Persons with companies (they are stakeholders in) in json format. I want to visualize the data in Kibana Graph in the format where there would be one person vertex with different edges leading to different company vertices he's a part of. I have tried the following schemas:

Schema 1:

    Person : {
      "name" : "Person-A",
      "company" : {
        "name" : "Company-A"
      }
    }

    Person : {
      "name" : "Person-A",
      "company" : {
        "name" : "Company-A"
      }
    }

This is basically one document per person per company. I then tried creating graph in Kibana with person.name and company.name (one person was associated with 15 companies, hence, I had 15 documents) but was not able to see anything.

I then came across this thread and it suggested me to have a schema with one person and multiple companies. So, I changed the schema to this:

Schema 2:

    Person : {
      "name" : "Person-A",
      "companies" : [
          {
            "name" : "Company-A"
          },
          {
            "name" : "Company-B"
          }
      ]
    }

I now have 1 document with 15 elements in the array for the same person. I then tried plotting the graph again and Kibana still didn't show anything.

Am I missing something here? Do I need to try with different schema?

cc @flash1293 , do you know (?)

By default Graph will only show connections between terms when they are confirmed by at least three documents. You can set this to one in Settings > Advanced Settings in the Graph menu (I think the value is called Minimum doc count).

Also see https://www.elastic.co/guide/en/kibana/current/graph-troubleshooting.html for other common problems

Thank you @thomasneirynck and @flash. This seems to have worked perfectly fine. Thanks again for your help!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.