Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Graph Visualization Using Solr 6

DZone's Guide to

Graph Visualization Using Solr 6

Solr 6 provides a load of great features, one of them is graph visualization.

· Big Data Zone ·
Free Resource

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

With the release of Solr 6 we’ve got the possibility of working with graphs when working with Solr (see more). Using the appropriate query we can retrieve documents representing a graph build out of our documents. The one missing piece was the visualization of the returned results. We thought we can fill that hole and we’ve developed a very simple tool to handle the visualization.

Using D3, Bootstrap, and jQuery, we’ve created a very simple tool that allows us to provide:

  • Solr instance address
  • Collection name
  • Parent document field
  • Document identifier field
  • Display field
  • Maximum number of documents to retrieve
  • Query

On the basis of the above information, we can create a very simple visualization of the graph:

solr graph visualization

What Do You Need?

To visualize your graph you need Solr 6, properly indexed data (more information here) and the graph.html file that is available at our Github account (https://github.com/solrpl/solrgraph).

Installation

To use our visualization tool, all you need to do is download the mentioned graph.html file and put it into $SOLR_HOME/server/solr-webapp/webapp directory. After that you just launch your favorite web browser and go to http://localhost:8983/solr/graph.html. This is done so we can omit all the CORS related problems.

Limitations

You should remember that the functionality was developed very fast and it has a number of limitations (though we will work on them in the following weeks):

  • We didn’t test it on large data sets
  • CORS dependent
  • It looks awful
  • It doesn’t use paging

Next Steps

We have a few ideas around the functionality. We would like to improve how the visualization looks and remove the dependency on CORS so that is easier to use. We will also extend the functionality to allow for filtering, providing different queries and allow control over all parameters around graph query. We would also like to hear from you, what you would like to have here and of course we will accept any pull requests on GitHub, help is welcome

Hortonworks Community Connection (HCC) is an online collaboration destination for developers, DevOps, customers and partners to get answers to questions, collaborate on technical articles and share code examples from GitHub.  Join the discussion.

Topics:
solr ,graph ,big data ,big data analytics

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}