Currently there are 100k Abstracs and 22k NormalizedNamedEntities and nearly 2 million uima_annotated edges.
Now I'd like to perform queries like this:
select expand(out) from uima_annotated where in.uuid = "DBA002026" and in.uuid = "NO000357"
This is like: give me all Abstracts (or the first 20) which have annotated a DBA002026-NormalizedNamedEntity AND NO000357-NormalizedNamedEntity.
The query is not efficient and returns nothing, because "fetched more than 50000 records: to speed up the execution, create an index or change the query to use an existent index".
I've tried to index uima_annotated.in, but this has no impact! Any ideas how to speed this up? Where should I place an index? Is it possible to index uima_annotated.in.uuid? Or is there a better way to express the query (maybe coming from NormalizedNamedEntity)?
Thanks for any advice!
select expand($c)
let $a = (select expand(in('uima_annotated')) from (select from NormalizedNamedEntity where uuid = "DBA002026")),
$b = (select expand(in('uima_annotated')) from (select from NormalizedNamedEntity where uuid = "NO000357") ),
$c = intersect( $a, $b)