I'm having some issues with the listdata.svc when it comes to executing date filters. Below are two statements, one works and one fails. The only difference is the order of the statements. Both columns are indexed:
- listdata.svc/MyTable?$select=Id,CaseNumber,Modified,FirstName&$filter=FirstName eq 'John' and Modified ge datetime'2015-06-20' THIS WORKS
- listdata.svc/MyTable?$select=Id,CaseNumber,Modified,FirstName&$filter=Modified ge datetime'2015-06-20' and FirstName eq 'John' THIS FAILS
I'm assuming that the problem might be with the number of the result set. Except both columns are indexed in SharePoint.
I have the same problem with other date fields -- all of which are indexed.
The test list has 40,000 rows.
NOTE: I have confirmed that the problem only happens with lists with over 5000 rows. Its like the listdata.svc does not use the indexes when searching on date columns -- even if they are indexed. NOTE: the query on date should only have found 20-30 rows -- well below the 5,000 limit.
Is there a problem in listdata.svc when it comes to filtering on indexed date columns?
HELP!!!
Cheers, Savin Smith