I'm perfectly aware about the threshold thing. I know I need to reduce my query. However, here, it's for a calendar... I use the below query:
<query> <Query> <Where> <DateRangesOverlap> <FieldRef Name="EventDate"></FieldRef> <FieldRef Name="EndDate"></FieldRef> <FieldRef Name="RecurrenceID"></FieldRef> <Value Type="DateTime"> <Month></Month> </Value> </DateRangesOverlap> </Where> <OrderBy> <FieldRef Name="EventDate" Ascending="ASC"></FieldRef> </OrderBy> </Query> </query>
With the below queryOptions:
<queryOptions> <QueryOptions> <DateInUtc>False</DateInUtc> <Paging ListItemCollectionPositionNext=""></Paging> <IncludeAttachmentUrls>True</IncludeAttachmentUrls> <IncludeMandatoryColumns>False</IncludeMandatoryColumns> <ExpandUserField>False</ExpandUserField> <ViewAttributes Scope="Recursive"></ViewAttributes> <CalendarDate>2014-05-10</CalendarDate> <RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion> <ExpandRecurrence>TRUE</ExpandRecurrence> </QueryOptions> </queryOptions>
My whole list has more than 5,000 events, but for the current month I have only a few of them. I would expect to see the events for the current month without reaching the threshold because we only want the events for the current month, so the query is already limited...
Any solution? (And no, I cannot change the limit of the threshold)