Graph search

348 views
Skip to first unread message

namratha...@gmail.com

unread,
Mar 31, 2015, 2:23:54 PM3/31/15
to popotoj...@googlegroups.com

I’m Namratha from Citrix, working on a simple prototype using Neo4j Graph DB and Popoto.js. I implemented most of your examples with movie and CalTrain datasets. I find Popoto.js very promising in areas of graph search and querying. In moving further into graph search, I have a few questions on the graph search display

 

1)     1) I see you have a minimum count for the displaying results  and the result list in the bottom displays some more results. What if I have a million nodes (movie instances) available in Neo4j. How does popoto.js retrieve and what is the recommended way to display all this information? Since displaying all the nodes will clutter the UI.

2)      2) If I have an attribute movie genre, how do I specify popoto.js to filter and then display only a particular genre nodes? Another example of the same is what if I would like to filter actors born after 1970?  Is there a way I can provide query parameters for attribute values in cypher url ? Since this would reduce the initial number of nodes to display

3)     3)  Also is there a way to retrieve only a subset of data based on some condition (match on a property value?) ?

 

Look forward to your reply soon !

 

Best,

Namratha

Popotojs alpha

unread,
Apr 2, 2015, 9:58:55 AM4/2/15
to popotoj...@googlegroups.com
Thanks for your questions Namratha.

1) Yes, you are right, the current alpha version contains some limitations on how the results are displayed.
Today Popoto.js only uses a property "popoto.query.RESULTS_PAGE_SIZE" to define the maximum number of results to return in the query.
This property is set to 100 by default but can be customized. It is used in the generated Cypher query with the LIMIT clause to return only the first 100 results: 
MATCH (person:`Person`) RETURN person LIMIT 100

This is a limitation because you can only look for the first results and if you have million nodes you would have to display all of them to be able to see the last results.
On future releases I plan to add a full pagination mechanism support, Neo4j REST API already has everything needed to implement that with SKIP and LIMIT.

Today one possible way is to let the user dynamically change the value of "popoto.query.RESULTS_PAGE_SIZE".
In this example I added a combo box to change this property to select the number of displayed results.


2) This is also a limitation in Popoto.js, today you can only define which property is used to identify a node and to create constraints for a particular label.
If I take the movie example if the constraint attribute is on "title", even if you can customize the value displayed on node, once selected the constraint will be an exact match on this attribute value.

MATCH (person:`Person`)-[:`ACTED_IN`]->(movie:`Movie`{`title`:"The Matrix"}) RETURN person LIMIT 100

If you have additional attributes in movie like "genre" there is today no way to use them to filter the results, only one attribute can be used to identify and constraint the node.
You could for example use "genre" as constraint attribute instead of "title" but this would completetly change the graph behavior, on click on movie node the displayed values would be all the différents movie genre instead of all the different movie titles.
One solution today with Popoto.js to be able to filter movies using genre would be to extract the genre attribute in a separate node and add a relation on each movie nodes in the database to the corresponding genre.
This way if you right click on movie in the graph you'll see the relation to genre where you could first select a genre which will filter the list of movie and then select the movie.

The use case you describe is part of the features I would like to add in future releases.
And for example with a right click on movie node, display a context menu where you could select an attribute on which to add a constraint and also select which operator to use for use cases like born after 1970.
But I still want to keep the UI as simple as possible because I want Popoto.js to be usable by non-technical users. 
I would be happy to get your feedback on this and how you would expect to build such use cases from the graph.


3) Not in the current version but I think I can easily add in configuration the possibility to add predefined constraint for a node.
You could for example add the constraint "born" > 1970 in Person node config to filter the dataset.

jbAtUN

unread,
Sep 8, 2015, 9:06:59 AM9/8/15
to Popotojs alpha
Greetings,

Excellent work!  We are using Popoto in a project for a major international organization and are trying to integrate some functionality.  Understanding from this thread that you want to keep the UI simple for non-tech users, we are looking to include a component for a cypher query input - similar to the Neo4j browser.  This is to take fullest advantage for graph traversal and short path search for complex queries (our graph database is fairly large).

If we were to develop such a component, do you have any advice for best way to integrate with existing Popotus functions, event handlers, listeners, etc.?

Here's the use case:

1.)  Text Area with codemirror to enter cypher query
2.)  Button for click to submit
3.)  New graph is returned based on search results
4.)  Popoto components are refreshed

P.S.
Also, we have no problem sharing the work if there'd be an interest in including it.

Cheers,

JB

Michael Hunger

unread,
Feb 27, 2016, 8:26:25 PM2/27/16
to Popotojs alpha
I think that's a great idea. I think the functionality would have to be limited though to return only one node or one node-label to become the new root of the popoto graph.

Something that would be nice though is to return a format that popoto could use to initialize the viz with a pre-selection.

I presume that even more than a free text area, a component that provies predefined queries (and some parameters/placeholders) would help (for non-technical users).

Michael
Reply all
Reply to author
Forward
0 new messages