Closed Hadjerkhd closed 6 years ago
@Hadjer13 Yes, I will add this possibility, the query feature is very recent, so it was added initially on nodes only for seeing the usage. But it will ship soon !
@Hadjer13 Done and released : https://products.graphaware.com/download/neo4j-to-elasticsearch/graphaware-neo4j-to-elasticsearch-3.4.0.52.10.jar
Is there any in depth documentation on how exactly this feature works? Where can I find how the id(r)={id}
works for example?
I'm trying this:
{
"condition": "hasLabel('Image')",
"index": "node-image",
"type": "image",
"properties": {
"url": "getProperty('url')",
"tags": "query('MATCH (i:Image)-[:tagged_with]->(t:Tag) where id(i) = {id} RETURN collect(t.name) AS value')"
}
}
but tags always ends up with an empty array in elasticsearch after this create statement:
CREATE (a:Image{url:'somerandomvalue'})-[:tagged_with]->(t:Tag{name:'arandomtag'})
Any help on how I could get that to work woudl be very appreciated.
Hello @ikwattro, I have the following relations that I want to index into ES, by simulating a parent-child join :
Member-[:ADD_COMMENT]->Comment Member-[:VOTES]->Comment
While Comment is the child and Member is the parent in both cases , and since ES allows only one parent per child, I'm indexing the relations :ADD_COMMENT and :VOTES. I wanted to add some properties to the indexed relations using Cypher queries , to do so, I've used the following mapping file :
The nodes are well indexed , yet the relations are not and I got the following exception :
From my understanding to this exception, cypher queries are not allowed in relationship mappings .. Is what I said correct ? if so , do you have any workaround ? or any plan to support this feature in the following version of the plugin ?
Thanks in advance !