The best way of audit trail in Neo4j - neo4j

I am going to store all nodes and relations changes without impact existing code, what is the best way to do that?
I've noticed APOC might fit this issue, can't find any example here.

You can create your custom trigger using the APOC library, according to your use case. The whole process is described here: Triggers In APOC
Or you can use the module suggested here.

Related

Modifying Cypher Query Engine

I would like to modify the way Cypher processes queries sent to it for pattern matching. I have read about Execution plans and how Cypher chooses the best plan with the least number of operations and all. This is pretty good. However I am looking into implementing a Similarity Search feature that allows you to specify a Query graph that would be matched if not exact, close (similar). I have seen a few examples of this in theory. I would like to implement something of this sort for Neo4j. Which I am guessing would require a change in how the Query Engine deals with queries sent to it. Or Worse :)
Here are some links that demonstrate the idea
http://www.cs.cmu.edu/~dchau/graphite/graphite.pdf
http://www.cidrdb.org/cidr2013/Papers/CIDR13_Paper72.pdf
I am looking for ideas. Anything at all in relation to the topic would be helpful. Thanks in advance
(:I)<-[:NEEDING_HELP_FROM]-(:YOU)
From my point of view, better for you is to create Unmanaged Extensions.
Because you can create you own custom functionality into Neo4j server.
You are not able to extend Cypher Language without your own fork of source code.

iOS Preserve custom methods in classes after recreating from core data

I am looking for someway how to preserve methods which I add to my classes which are generated from Core Data. It should be mainly init methods but It could be other methods too. When I was looking best approach for this I found this question but It's a little old and I hope there is better solution now. So exists better solution?
I think creating Categories like suggested in the accepted answer on the question you're referring to is a valid approach. The other option is to stop generating the files when you've reached a stable point for your entities. Normally they shouldn't keep changing too much (since that will introduce challenges with migrations etc). And if the changes are small enough (like adding a new property etc) its easy to do this manually.
You could also have a look at Moogenerator which I know a lot of ppl who are happy with.

is it possible to add new function to cypher?

it would be appreciated to if anyone can answer that is there any way to add an LOOP function to cypher?
i can find loops in graph by use of traversal. but i want to know is there anyway to pass obtained result to a customized user defined Cypher function?
Not yet. They're talking about UDFs (User Defined Functions) in an upcoming release of Neo4j, though. You might consider refining your use case and asking for it as a feature of Cypher itself in github issues, as well.
Until UDFs are possible with Cypher, you might consider using unmanaged extensions.
It seems that you are asking two different questions.
About whether you can use loops in Cypher, yes you can, with FOREACH or UNWIND, depending on what you want to achieve. This is a good resource for when you don't quite know which is the right one for your case. It compares the two and tries them with different example queries.
As for whether you can write user defined function, as of Neo4j 3.0, you can. They are however written in Java.
Look into this link for more details: https://neo4j.com/developer/procedures-functions/

How to create Timeline per Node in Neo4j

I had tried to ask this question earlier and will try and restate the question. I have a graph of people or nodes representing people and each person has a calendar associated with him/her.
The calendar is represented using a Timeline. I came across this old thread (http://lists.neo4j.org/pipermail/user/2011-April/007966.html), which kind of says that implementing the model of Timeline-per-Node is difficult with LuceneTimeline and the older B-tree implementation was more efficient. Is it still true?
Is there a B-tree implementation available in version 1.8 and higher ?
Has anyone faced a similar problem ?
I am working on building a plugin to expose a REST interface for managing Timelines. The problems I'm facing are:
How to retrieve an existing LuceneTimeline ?
How to associate a Timeline with every Node ?
Are there any examples anywhere ?
Thanks,
https://github.com/neo4j/graph-collections/blob/master/src/test/java/org/neo4j/collections/timeline/TestTimeline.java is probably what you should. This however does not work great over REST as it is using the Java Embedded API. Either send over Groovy code, or do a custom Neo4j Server plugin, see http://docs.neo4j.org/chunked/stable/server-plugins.html .
Also, you can do something like that with Cypher, see http://docs.neo4j.org/chunked/stable/cypher-cookbook-path-tree.html

Making a "join" of two collections

I was wondering if this approach using "observe" still is the recommended approach to achieve joins between two collections.
Meteor and DBRefs
Thanks,
Vindberg.
During the first meteor meetup I asked one of the core developers this very question. The answer was, unfortunately, yes. Using observe is currently the only way to achieve a join, however I was told a solution to this will be added prior to 1.0. I wish I had more information than that. Personally I think the lack of built-in joins is one of meteor's biggest missing features, but I don't see people making a lot of noise about it.

Resources