5

My goal is to add to neo4j engine additional (global) filtering rules.

According to this answer:

Cypher is build on the Traversal API

Though I tried to set breakpoints in PathExpanders.scala and StandardExpander.scala and it seems they aren't triggered while executing cypher MATCH query. Also modifying PathEvaluator in Evaluators.java didn't affected results for cypher queries.

I also inspected ast.rewriters which are triggered during cypher parsing, though it seems that I need to embed global filtering on later steps - when engine selects data from store.

Tried to understand internals from this diagram presentation: https://www.slideshare.net/thobe/an-overview-of-neo4j-internals Though there is not much information about exact modules.

In which place verification of node/relationship properties happens for cypher queries?

Links to internal docs also would be helpful!

Daniel Garmoshka
  • 5,849
  • 39
  • 40

1 Answers1

0

You are in the right place:

Cypher is build on the Traversal API

The problem seems your IDE is not hitting the breakpoints, if you are using eclipse the most sure-fire way to do this (and end up with something that's actually useful) is to download the source, and set up another "Java Project" pointing at that source.

To do that, get the source downloaded and unzipped somewhere on your system. Click "File"->"New"->"Java Project". In the next dialog, give it a project name and select "Create Project from Existing Source". Browse to the root location of the open source library.

Supposing that all the additional libraries that are required by the project and such are included in the project you downloaded, Eclipse will figure everything out and set the build path up for you.

You'll need to remove the open source jar from your project's build path, and add this new project to the build path of your project.

Now, you can just treat this as your code, and debug at will.

DeadSpock
  • 478
  • 3
  • 13
  • 1
    DeadSpock, definitely thank you for detailed explanation of debug process. While your post doesn't provide direct answer for question, it surely adds great value and without doubt - the best answer amongst given! :) Aaaaand the prize goes to... DeadSprock!! – Daniel Garmoshka Nov 13 '17 at 10:48