I tried using the Search API to find items which are linked to an annotation. I wanted to use either the ID or the namespace of the example annotation to restrict the result, but neither worked. Is this expected?
Here's an example how I perform the search:
- Code: Select all
# this is contetn of the ScreenAcquisitionAnnotationLink table:
omero4_1=> select id, parent, child from ScreenAcquisitionAnnotationLink;
id | parent | child
----+--------+-------
1 | 51 | 121
2 | 51 | 125
an= FileAnnotationI()
an.ns = rstring('some.namesspace')
search.onlyType("ScreenAcquisition")
s.byAnnotatedWith((an,))
len(s.results())
>>> 2
an.ns = rstring('foo')
s.byAnnotatedWith((an,))
len(s.results())
>>> 2
an.ns = None
an.id = rlong(121)
s.byAnnotatedWith((an,))
len(s.results())
>>> 2
Thanks for help! Bernhard