Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-06-2022 03:46 PM
hello, first thanks for the great work:
i'm in a scenario where i need to capture user profiles that have common likes in a specific user's preferences i tried using MATCH but i would like results to be returned even if one of the calls to MATCH fails i also tried OPTIONAL MATCH but when it doesn't I have an optional relation at the beginning of the query, nothing is returned, here is my example code:
11-06-2022 06:57 PM - edited 11-06-2022 06:58 PM
The return value of 'a' is not defined. Can you provide a data model and/or sample data? Can you explain what you are trying to achieve? What value(s) do you want returned?
11-06-2022 08:42 PM
Sorry, correct query is:
11-07-2022 04:22 AM
In your data model, are all the p2 nodes in the query supposed to be the same node? If so, are the Gender, AstrologicalSign, MusicalStyle, Religion, and Smoke all the types of nodes the path can traverse through, or are there other types you don’t want the path to go through?
11-07-2022 10:06 AM
Yes, I would like to return the p2:Profile that has or does not match with:
Gender, AstrologicalSign, MusicalStyle, Religion and Smoke
but if I put optional match and there is no relation, p2 is null, I would like to avoid this
11-07-2022 02:26 PM
Is the p2:Profile the same for Gender, AstrologicalSign, MusicalStyle, Religion and Smoke, or are they different based on those labels?
I am confused when you state "p2:Profile that has or does not match". What do you mean by "does not match", what do you expect if it does not match?
Optional Match will return a null value if a match is not found. That is the behavior. What behavior do you want?
I am sorry I am not clear on your objectives.
11-07-2022 02:44 PM
I'm working on a dating app, where Profiles can have Preferences, like Gender, MusicalStyle and others, it works great when all Preferences of Profile have matches, but a Profile can match Gender but not MusicalStyle, so I want to bring the result anyway.
11-06-2022 08:42 PM
I updated the problem
All the sessions of the conference are now available online