Hi Alessandro,
Thank you.
Sorry, I had a small mistake in my post. The query is actually correct. But
I posted the relationship wrong. It looks like this
CUI<---SENTENCE---->RELATION
orientdb {db=emerald_corpus_with_indexes}> select ref_id from sentence
where ['C0024530','C0013090'] in out('hasCui').ref_id
----+------+------
# |@CLASS|ref_id
----+------+------
0 |null |41
1 |null |116
2 |null |137
3 |null |138
4 |null |139
5 |null |51
6 |null |113
7 |null |114
8 |null |151
9 |null |30
10 |null |133
11 |null |146
12 |null |151
13 |null |157
14 |null |171
15 |null |118
16 |null |127
17 |null |55
18 |null |33
19 |null |128
----+------+------
LIMIT EXCEEDED: resultset contains more items not displayed (limit=20)
20 item(s) found. Query executed in 39.347 sec(s).
orientdb {db=emerald_corpus_with_indexes}> select ref_id from sentence let
$a = out('hasCui') where $a.ref_id contains 'C0024530' and $a.ref_id
contains 'C0013090'
This query is running forever and it doesn't quit. So I tried this.
orientdb {db=emerald_corpus_with_indexes}> select ref_id from sentence let
$a = out('hasCui') where $a.ref_id containstext 'C0024530'
----+------+------
# |@CLASS|ref_id
----+------+------
0 |null |113
1 |null |114
2 |null |55
3 |null |33
4 |null |54
5 |null |85
6 |null |106
7 |null |114
8 |null |50
9 |null |82
10 |null |83
11 |null |113
12 |null |2
13 |null |3
14 |null |29
15 |null |31
16 |null |35
17 |null |42
18 |null |44
19 |null |46
----+------+------
LIMIT EXCEEDED: resultset contains more items not displayed (limit=20)
20 item(s) found. Query executed in 113.49 sec(s).
Thanks,
Regards,
Bharath
On Tuesday, September 29, 2015 at 3:59:16 AM UTC-4, [email protected]
wrote:
>
> Hi,
> try this query and let me know if it's faster
> select ref_id from sentence let $a = in('hasCui') where $a.ref_id contains
> 'C0024530' and $a.ref_id contains 'C0013090'
>
> If the relationship between the classes is the following CUI--->SENTENCE
> <--RELATION
> in your first query you should have "select expand(out('hasCui')) from
> CUI" and not "select expand(in('hasCui')) from CUI"
>
> Alessandro
>
--
---
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.