Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

March 25, 2012

Lucene Full Text Indexing with Neo4j

Filed under: Indexing,Lucene,Neo4j,Neo4jClient — Patrick Durusau @ 7:15 pm

Lucene Full Text Indexing with Neo4j by Romiko Derbynew.

From the post:

I spent some time working on full text search for Neo4j. The basic goals were as follows.

  • Control the pointers of the index
  • Full Text Search
  • All operations are done via Rest
  • Can create an index when creating a node
  • Can update and index
  • Can check if an index exists
  • When bootstrapping Neo4j in the cloud run Index checks
  • Query Index using full text search lucene query language.

Download:

This is based on Neo4jClient: http://nuget.org/List/Packages/Neo4jClient

Source Code at:http://hg.readify.net/neo4jclient/

Introduction

So with the above objectives, I decided to go with Manual Indexing. The main reason here is that I can put an index pointing to node A based on values in node B.

Imagine the following.

You have Node A with a list:

Surname, FirstName and MiddleName. However Node A also has a relationship to Node B which has other names, perhaps Display Names, Avatar Names and AKA’s.

So with manual indexing, you can have all the above entries for names in Node A and Node B point to Node A only. (emphasis added)

Not quite merging but it is an interesting take on creating a single point of reference.

BTW, search for Neo4j while you are at Romiko’s blog. Several very interesting posts and I am sure more are forthcoming.

February 26, 2012

Neo4jClient

Filed under: .Net,Neo4j,Neo4jClient — Patrick Durusau @ 8:31 pm

Neo4jClient

From the description:

A .NET client for the neo4j REST API. neo4j is an open sourced, Java based transactional graph database. It’s pretty awesome.

February 22, 2012

Gremlin vs Cypher Initial Thoughts @Neo4j

Filed under: Cypher,Graphs,Gremlin,Neo4j,Neo4jClient — Patrick Durusau @ 4:49 pm

Gremlin vs Cypher Initial Thoughts @Neo4j

Romiko Derbynew writes:

The Neo4jClient now supports Cypher as a query language with Neo4j. However I noticed the following:

  • Simple graph traversals are much more efficient when using Gremlin
  • Queries in Gremlin are 30-50% faster for simple traversals
  • Cypher is ideal for complex traversals where back tracking is required
  • Cypher is our choice of query language for reporting
  • Gremlin is our choice of query language for simple traversals where projections are not required
  • Cypher has intrinsic table projection model, where Gremlins table projection model relies on AS steps which can be cumbersome when backtracking e.g. Back(), As() and _CopySplit, where cypher is just comma separated matches
  • Cypher is much better suited for outer joins than Gremlin, to achieve similar results in gremlin requires parallel querying with CopySplit.
  • Gremlin is ideal when you need to retrieve very simple data structures
  • Table projection in gremlin can be very powerful, however outer joins can be very verbose

So in a nutshell, we like to use Cypher when we need tabular data back from Neo4j and is especially useful in outer joins.

Excellent comparison of Gremlin vs. Cypher. Both have their advantages.

Powered by WordPress