My problem was solved, so I have no complaints. I still think it would be nice to have a syntax available to say &templates=`5,7` or &sometv=`’some value’,’some other value’` and so on. Perhaps this could be written as an abstract class that would accept any field. This could either replace or supplement the tagging extender idea.
Or, even better, here’s a variation on the idea that takes it further by combining and streamlining the ideas of parents/documents, tagging, and filters (just as food for thought):
&retrieve=`parent(56,32); template(5,7); sometv(-’some value’,-’some other value’); pagetitle(%2007%); anothertv(>=100); createdon(date(2007/01/01 to 2007/12/11, -2007/07/04))`
This is admittedly a lot more complex than most of the situations I’m faced with, but here’s what it would do: It would include documents in folders 56 and 32, with a template of 5 or 7, with a ’sometv’ value that does not equal ’some value’ or ’some other value’, a pagetitle that includes 2007 in it, an ’anothertv’ value that is greater than or equal to 100, and a createdon date between Jan 1 2007 and Dec 11, 2007, except for July 4 2007 (the word ’date’ in the parameter would signal that the values in parentheses after it are to be understood as dates, and the word ’to’ defines a range).
Obviously, the syntax of this idea could be altered if you don’t like the way it looks, but something along these lines would work. It would be very powerful.
You’d have to come up with some way to specify the delimiter for delimited fields, and a few other things like that, but this could be worked into the basic syntax above. Maybe ’delimiter’ could be a pre-defined keyword:
sometv(delimiter(’,’) -’some value’,-’some other value’);
Or maybe there’s a more elegant way.
In any case, having a unified way of filtering would be a HUGE bonus. Feel free to take any and all of these ideas. I’d certainly benefit if you did.
And you could still make simpler calls using this syntax, for example:
&retrieve=`parent(4)`
&retrieve=`id(453,454)`
&retrieve=`id(453 to 500)`
&retrieve=`id(453 to 500,600)`
and so on.
EDIT:
You could also use ’and’ and ’or’ as keywords, as a variation on this idea:
&retrieve=`sometv(’some value’ and (’some other value’ or ’still another value’))`
or always interpret the comma as ’and’, so the above could be reduced to:
&retrieve=`sometv(’some value’,(’some other value’ or ’still another value’))`
With this in mind, references to templates would have to include an ’or’ operator (as opposed to the comma used in the examples further up in this post), because a document can have only one template:
&retreive=`template(5 or 7)`