Looks like this does it:

and ($object <http://www.uhi.ac.uk/ontologies/ltk/relationships#isInCategory> 
<info:fedora/test_category_1>
or $object <http://www.uhi.ac.uk/ontologies/ltk/relationships#isInCategory> 
<info:fedora/test_category_2>)

Alistair


From: Alistair Young <alistair.yo...@uhi.ac.uk<mailto:alistair.yo...@uhi.ac.uk>>
Reply-To: "Support and info exchange list for Fedora users." 
<fedora-commons-users@lists.sourceforge.net<mailto:fedora-commons-users@lists.sourceforge.net>>
Date: Friday, 18 January 2013 10:56
To: "Support and info exchange list for Fedora users." 
<fedora-commons-users@lists.sourceforge.net<mailto:fedora-commons-users@lists.sourceforge.net>>
Subject: [fcrepo-user] grouping itql queries

Hello good folk, I'm hoping this is possible:

Using risearch I can query against a dc:subject as well as being in a category 
(collection):

select $object $title $subject from <#ri>
where $object <dc:subject> 'test'
and $object <dc:title> $title
and $object <dc:subject> $subject
and $object <http://www.uhi.ac.uk/ontologies/ltk/relationships#isInCategory> 
<info:fedora/test_category_1>
or $object <http://www.uhi.ac.uk/ontologies/ltk/relationships#isInCategory> 
<info:fedora/test_category_2>

Problem is the 'or' clause finds all objects in test_category_2 independent of 
the subject search. What I need is:

Object has dc:subject='test' and is in either test_category_1 or test_category_2

Is there a way to evaluate:

subject=test and (isInCategory=test_category_1 or isInCategory=test_category_2)

Thanks,

Alistair


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to