I am trying to store array as a property but not able to query with that..
My array is
$hashtags_ids = [364,430,560,333,329];
Using php code to save this property..
$node->setProperty('hashtags', $hashtags_ids)->save();
$storyIndex->add($node, 'hashtags', $second_node->getProperty('hashtags'));
$node->save();
It is getting stored as well in graph DB..
After inserting properties of node are ::
id:3364 story_id:339 is_trending:0 activity_id:102245 is_featured:0 is_active:0 name:story_339 hashtags:[364,430,560,333,329]
Now when i am writing cypher query to return ids which have value as 560 in hashtags property, it is returning zero rows..
My Cypher Query ::
MATCH (n) WHERE HAS(n.hashtags) AND ALL (m IN [560] WHERE m IN n.hashtags) return n;
How to query with array properties and how to effectively store array in neo4j..??
Thanks
Jugal Singh
I am trying to store array as a property but not able to query with that..
My array is
$hashtags_ids = [364,430,560,333,329];
Using php code to save this property..
$node->setProperty('hashtags', $hashtags_ids)->save();
$storyIndex->add($node, 'hashtags', $second_node->getProperty('hashtags'));
$node->save();
It is getting stored as well in graph DB..
After inserting properties of node are ::
id:3364 story_id:339 is_trending:0 activity_id:102245 is_featured:0 is_active:0 name:story_339 hashtags:[364,430,560,333,329]
Now when i am writing cypher query to return ids which have value as 560 in hashtags property, it is returning zero rows..
My Cypher Query ::
MATCH (n) WHERE HAS(n.hashtags) AND ALL (m IN [560] WHERE m IN n.hashtags) return n;
How to query with array properties and how to effectively store array in neo4j..??
Thanks
Jugal Singh