MATCH and where

32 visualizações
Pular para a primeira mensagem não lida

jonatha...@gmail.com

não lida,
23 de set. de 2016, 17:06:2823/09/2016
para OrientDB
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}

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)}

but zero records are returned.

Any idea what's going on?

Thank you

Luigi Dell'Aquila

não lida,
25 de set. de 2016, 02:22:5725/09/2016
para orient-...@googlegroups.com
Hi Jonathan,

That's quite strange, it seems to be a bug. Could you please report an issue here?


Thanks

Luigi

--

---
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 orient-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem