-
Notifications
You must be signed in to change notification settings - Fork 871
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
Selecting all vertices connected by and edge to another specific list of vertices #5608
Comments
just to understand, is the OUT_FALLS_INTO an attribute of the Page? Thanks Luigi |
@luigidellaquila nope.. "FALLS_INTO" is an edge pointing out from the Post to the Category class. 32:0 and 32:1 are the id's of 2 Category vertices |
@luigidellaquila I have edited the comment and changed it to out("falls_into") |
I think the right query should be something like:
Thanks Luigi |
Thanks ... I will try it out |
@luigidellaquila Any idea why its acting weird.. |
I don't know, just consider that I changed If you can share a simple dataset I'll try it and I'll try to give you some more info Thanks Luigi |
@luigidellaquila I changed the out('BELONGS_TO') to in('BELONGS_TO').. How should I give the dataset? Should I give you the db dump? |
yes, a db dump would be perfect Thanks Luigi |
Hi @luigidellaquila |
I think the query you are looking for is the following:
(probably you have different cluster IDs, because of the import/export) Thanks Luigi |
This works. Thanks... I confused the edge id and the vertex id shown in the orientdb studio. I was using wrong ids in the queries which I tried. Now it works but I have a one more question.. Its returning 3 rows with same data... There are duplicate rows in the result.. Any idea why? |
probably you have multiple paths between the user and the post. You can change your query this way to avoid duplicates:
I'm closing this issue, please reopen in case you have any other problems. Thanks Luigi |
Thanks for the help |
select expand( in('BELONGS_TO') ) from
(select expand(out('follows')) from User where @Rid = #13:0 )
This query returns posts from all pages followed by a user
User ->(follows)->Page
Post->(belongs_to)Page
each post falls-into a category as well
I need to filter the same output based on multiple categories.
something like this
select expand( in('BELONGS_TO') AND OUT("FALLS_INTO") in ["#32:0","#32:1] ) from
(select expand(out('follows')) from User where @Rid = #13:0 )
The text was updated successfully, but these errors were encountered: