Quantcast
Channel: Spring Community Forums - NoSQL
Viewing all articles
Browse latest Browse all 128

neo4j: intercepting entity saves in order to add data to an index

$
0
0
I have a domain @NodeEntity entity that I wish to push to the neo4j database. It has a byte[] and mime string field to indicate the content of the bytes. The node is not designed to handle large documents but I still want differently formatted text to be supported up to a reasonable size.

Is there a way to intercept the persistency process and allow me to translate that byte[] field to a text field when the mime field is text/plan (a string)? This way I can index the "note" in the lucene index. I want to be part of the transaction. I did not see any interceptors in the persistency lifecycle and the application events (Before- and After- SaveEvents) do not appear to fire at the right time or be included in the transaction boundaries.

Viewing all articles
Browse latest Browse all 128

Trending Articles