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.

Reply via email to