Hi,
Seems you are executing difference() between 2 collections that contains a
collection inside. Could you post the full query?

Lvc@


On 29 January 2015 at 10:39, wkrause <[email protected]> wrote:

> Tried with version 2.0.1 of OrientDB btw :)
>
>
>
> On Thursday, January 29, 2015 at 10:33:57 AM UTC+2, wkrause wrote:
>>
>> Hi. Just want to confirm that I am experiencing issues with the
>> difference function. Given two collections as first and second parameter,
>> it does not return a difference result, but instead returns the exact same
>> collections passed in as arguments, in two arrays inside the "difference"
>> element. For example:
>>
>> {
>>     "result": [
>>         {
>>             "difference": [
>>                 [
>>                     "#14:16",
>>                     "#14:17",
>>                     "#14:29"
>>                 ],
>>                 [
>>                     "#14:16",
>>                     "#14:26",
>>                     "#14:27"
>>                 ]
>>             ],
>>         }
>>     ]
>> }
>>
>>
>> On Thursday, January 15, 2015 at 1:15:24 AM UTC+2, Lvc@ wrote:
>>>
>>> We fixed a bug on difference months ago. Could you try with 2.0-SNAPSHOT?
>>>
>>> Lvc@
>>>
>>>
>>> On Wednesday, 13 August 2014 22:38:20 UTC+2, amoore wrote:
>>>>
>>>> Hi,
>>>>
>>>> We are using version v.1.7-rc2, embedded in our application, and I'm
>>>> struggling to figure out a query for removing one set of results from
>>>> another set of results.
>>>>
>>>> For a simplified example, we have a class of type "A" which is a
>>>> directional hierarchy. Lets assume the class has a "name" defined (of
>>>> areas, regions, counties, cities, etc), and a "parent" edge defined (a
>>>> relationship from the child vertex to the parent vertex).
>>>>
>>>> I was able to find the intersection of the result sets from the two
>>>> sub-queries of my hierarchy:
>>>>
>>>> select expand( $1 ) LET $2 = ( select from (traverse in('parent') from
>>>> (select from A where name = 'Eastern')) where $depth > 0 and name like
>>>> '%a%' ), $3 = ( select from (traverse in('parent') from (select from A
>>>> where name = 'Eastern')) where $depth > 0 and name like '%o%' ), $1 =
>>>> *intersect(* $2, $3 )
>>>>
>>>>
>>>> I thought I could accomplish the opposite effect if I used the
>>>> difference() function:
>>>>
>>>> select expand( $1 ) LET $2 = ( select from (traverse in('parent') from
>>>> (select from A where name = 'Eastern')) where $depth > 0 and name like
>>>> '%a%' ), $3 = ( select from (traverse in('parent') from (select from A
>>>> where name = 'Eastern')) where $depth > 0 and name like '%o%' ), $1 =
>>>> *difference*( $2, $3 )
>>>>
>>>> but it returns zero records, when the sub queries for $2 and $3 return
>>>> record sets that overlap. What am I failing to understand? I've searched
>>>> the forums and documentation, but haven't figured it out.
>>>>
>>>> In the end, I want to take vertices found in one result set, and remove
>>>> from it any vertices found in a second result set.
>>>>
>>>> Any ideas or directions would be extremely helpful!
>>>>
>>>> Regards,
>>>>
>>>> Andrew
>>>>
>>>>  --
>
> ---
> 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.
>

-- 

--- 
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.

Reply via email to