Hi Jonathan, That's quite strange, it seems to be a bug. Could you please report an issue here?
https://github.com/orientechnologies/orientdb/issues Thanks Luigi 2016-09-23 22:56 GMT+02:00 <[email protected]>: > I want to use MATCH to find pairs of nodes that share two other nodes. I > run the following query: > > MATCH > {class:Gene, as:g1} -IS_PART_OF-> {class:Organism, as:o1} <-IS_PART_OF- > {class:Gene, as:g2}, > {class:Gene, as:g1} -OBSERVED_IN-> {class:Location, as:loc} <-OBSERVED_IN- > {class:Gene, as:g2} > RETURN o1.name, g1.name, g2.name, loc.name > > It almost returns what I want, but includes identical nodes in a pair: > METADATAPROPERTIES > > @version > o1_name > g1_name > g2_name > loc_name > 0 > Plasmodium falciparum > Rh1 > DHFR-TS > Kenya > 0 > Plasmodium falciparum > Rh1 > MSPDBL2 > Kenya > 0 > Plasmodium falciparum > Rh1 > mrp2 > Kenya > 0 > Plasmodium falciparum > Rh1 > var2csa > Kenya > 0 > Plasmodium falciparum > Rh1 > MSPDBL1 > Kenya > 0 > Plasmodium falciparum > Rh1 > Rh4 > Kenya > 0 > Plasmodium falciparum > Rh1 > hrp3 > Kenya > 0 > Plasmodium falciparum > Rh1 > MSP3 > Kenya > 0 > Plasmodium falciparum > Rh1 > Rh1 > Kenya > 0 > Plasmodium falciparum > Rh1 > EBL1 > Kenya > > I try to filter the identical node pairs using where: > > MATCH > {class:Gene, as:g1} -IS_PART_OF-> {class:Organism, as:o1} <-IS_PART_OF- > {class:Gene, as:g2}, > {class:Gene, as:g1} -OBSERVED_IN-> {class:Location, as:loc} <-OBSERVED_IN- > {class:Gene, as:g2, where: ($matched.g1.name <> $currentMatch.name)} > RETURN o1.name, g1.name, g2.name, loc.name > > but zero records are returned. > > Any idea what's going on? > > Thank you > > -- > > --- > 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.
