As vitorenesduarte suggested, I found the answer. Yes I should look for
edges, filter the edges, than take out the vertices from the edges, like
following:
select expand( unionAll(inE('knows')[method='friend'].out,
outE('knows')[method='friend'].in ) from <rid>
The problem with this query is that I think it could be optimized if
OrientDB would have a function to take both way vertices from edges,
something like this:
bothE('knows')[method='friend'].both
But the .both function doesn't exist (at least in the version I use, which
is 1.7.4). If anyone knows something about this, please leave a comment.
On Tue, Mar 17, 2015 at 8:18 PM, Mihai Pricop <[email protected]>
wrote:
> I updated the post with an exemplification of what I want. Hope this will
> clear things out.
>
> On Tue, Mar 17, 2015 at 7:16 PM, nagaraja sosale ramaswamy <
> [email protected]> wrote:
>
>> it would help if you can provide the actual schema and sample data along
>> with the expected result
>>
>>
>> ~nagu.
>>
>>
>> On Tuesday, March 17, 2015 at 6:58:17 PM UTC+5:30, Mihai Pricop wrote:
>>>
>>> HI, I am new to OrientDB and I tried to play with it for the last month,
>>> but now I started some tasks and bumped in some problems.
>>>
>>> My problem for now is the following:
>>>
>>> I have a structure:
>>> - User - a vertex, with property id and services
>>> - worked - an edge, with property recommendation (a string with a few
>>> possible values)
>>>
>>> I need to find all nearby Users of a certain User that have a
>>> relationship of the type 'worked' with a certain property (let's say:
>>> 'recommended'); this in my vision will translate as:
>>>
>>> select expand( both()[recommendation='recommended'] ) from <@rid>
>>>
>>> But this query does not return anything.
>>>
>>> I'm running OrientDB 1.7.4.
>>>
>>> Hope someone can help me,
>>> Thank you.
>>>
>> --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OrientDB" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/orient-database/MCeUchXP-DU/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.