[daisy] Query in pubreq: get documents matching contextdoc's collection(s)

Vincent Mouton vincent at postback.be
Mon May 5 17:06:02 CEST 2008


Hello,

I'm trying to get a query working in a publisher request, to no avail.

What I'm trying to do, in plain English: Get all the documents, of
documentType FoodDocument, that matches the context document's
collection(s).

In Daisy Query Language I came up with:

select name, id
where collections has any (ContextDoc(collections))
and documentType = 'FoodDocument'

Which gives me "[Ljava.lang.String; cannot be cast to java.lang.String"

I've got multiple sites (lets say: cats, dogs, elephants), and I'd
like to define that, when I created a FoodDocument, it can be used
inside the 'cats' site and inside the 'dogs' site.

I wouldn't like to make things 'hardcoded', and avert a situation
where I have defined pubreqs for each individual site. All sites are
currently using the same pubreqs, as they all need exactly the same
pubreqs. I know i can handle this with individual pubreqs for each
site, and end up with InCollection('cats') and InCollection('dogs')
etc. It would just be easier for me to update the queries if they are
all centralised in one set of pubreqs.


Just wondering if that's possible.

Thanks,
v


More information about the daisy mailing list