Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to store array values as a property of node.. #186

Open
JugalSA opened this issue May 31, 2016 · 0 comments
Open

How to store array values as a property of node.. #186

JugalSA opened this issue May 31, 2016 · 0 comments

Comments

@JugalSA
Copy link

JugalSA commented May 31, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant