Neo4j: Which internal module is responsible for checking the WHERE conditions from cypher?

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

According to this answer :

Cypher Built on Traverse API

Although I tried to set breakpoints in PathExpanders.scala and StandardExpander.scala , and it seems that they do not start when the cypher MATCH request is executed. Also, changing the PathEvaluator in Evaluators.java did not affect the results for cypher requests.

I also checked ast.rewriters , which run during parsing of cypher, although it seems that I need to embed global filtering in the next steps - when the engine selects data from the storage.

I tried to understand the insides from this diagrammatic presentation: https://www.slideshare.net/thobe/an-overview-of-neo4j-internals Although there is little information about exact modules.

Where does the node / relationship property check happen for cypher requests?

Links to internal documents will also be useful!

+5
source share
1 answer

You are in the right place:

Cypher Built on Traverse API

The problem is that your IDE does not hit breakpoints if you use eclipse, the most reliable way to do this (and end up with something that is really useful) is to download the source code and set up another “Java” project "pointing to this source.

To do this, download the source code and unzip it somewhere on your system. Click File → New → Java Project. In the next dialog box, specify the name of the project and select "Create a project from an existing source." Go to the root location of the open source library.

Assuming all of the additional libraries that a project needs, etc., are included in the loaded project, Eclipse will select everything and set the build path for you.

You need to remove the open source jar from the project creation path and add this new project to the build path of your project.

Now you can simply consider this as your code and debug as you wish.

0
source

Source: https://habr.com/ru/post/1272906/


All Articles