Hi guys, is there a way to "OR" prop-filters? I'm looking for all events that occur in either LOCATION 1 or 2. This is what I have been trying: <ns0:comp-filter name="VCALENDAR"> <ns0:comp-filter name="VEVENT"> <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" /> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">1</ns0:text-match> </ns0:prop-filter> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">2</ns0:text-match> </ns0:prop-filter> </ns0:comp-filter> </ns0:comp-filter> But this ANDs the prop-filters. Is there no way to OR or is there another way to achieve what I'm trying to do here? Atli.
I found this http://tools.ietf.org/html/draft-daboo-caldav-extensions-01 and test=anyof works on the comp-filter eg. <ns0:comp-filter name="VCALENDAR"> <ns0:comp-filter name="VEVENT" test="anyof"> <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" /> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">1</ns0:text-match> </ns0:prop-filter> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">2</ns0:text-match> </ns0:prop-filter> </ns0:comp-filter> </ns0:comp-filter> But that implies that I get events for LOCATION 1 and 2 regardless of time-range. I tried to put the test="anyof" param on the prop-filters but that didn't work, even when I added multiple text-match elements to the same prop-filter like so <ns0:comp-filter name="VEVENT"> <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" /> <ns0:prop-filter name="CATEGORIES" test="anyof"> <ns0:text-match collation="i;octet">1</ns0:text-match> <ns0:text-match collation="i;octet">2</ns0:text-match> </ns0:prop-filter> </ns0:comp-filter> That causes an error on the server: Too many children of type {urn:ietf:params:xml:ns:caldav}text-match for {urn:ietf:params:xml:ns:caldav}prop-filter So I'm still stumped... Atli On 4 July 2014 12:34, Atli Thorbjornsson <atlithorn@gmail.com> wrote:
Hi guys, is there a way to "OR" prop-filters?
I'm looking for all events that occur in either LOCATION 1 or 2.
This is what I have been trying:
<ns0:comp-filter name="VCALENDAR"> <ns0:comp-filter name="VEVENT"> <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" /> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">1</ns0:text-match> </ns0:prop-filter> <ns0:prop-filter name="LOCATION"> <ns0:text-match collation="i;octet">2</ns0:text-match> </ns0:prop-filter> </ns0:comp-filter> </ns0:comp-filter>
But this ANDs the prop-filters. Is there no way to OR or is there another way to achieve what I'm trying to do here?
Atli.
Hi Atli, --On July 4, 2014 at 1:15:06 PM +0000 Atli Thorbjornsson <atlithorn@gmail.com> wrote:
That causes an error on the server:
Too many children of type {urn:ietf:params:xml:ns:caldav}text-match for {urn:ietf:params:xml:ns:caldav}prop-filter
So I'm still stumped...
We don't support the extend query right now. Plus we don't index anything beyond the UID and start/end information, which means queries on other properties will require the server to read in every calendar object and apply the match criteria. In a large calendar that will take a very long time. Depending on your application, it may be better to cache all the calendar data locally and apply local search optimizations. At some point we may enhance the query report with the anyof/allof additions and index additional properties - but right now very few clients do anything more than a time-range query so there is little impetus to do that. -- Cyrus Daboo
Hi Cyrus,
We don't support the extend query right now. Plus we don't index anything beyond the UID and start/end information, which means queries on other properties will require the server to read in every calendar object and apply the match criteria. In a large calendar that will take a very long time. Depending on your application, it may be better to cache all the calendar data locally and apply local search optimizations.
At some point we may enhance the query report with the anyof/allof additions and index additional properties - but right now very few clients do anything more than a time-range query so there is little impetus to do that.
Thanks, this explains why test="anyof" does not apply to the time-range as I feared (I tested after I sent the last mail), it is obviously dealt with first before the other prop-filters come into play. Atli.
participants (2)
-
Atli Thorbjornsson
-
Cyrus Daboo