Forum Discussion

patrictNg's avatar
patrictNg
Copper Contributor
Oct 02, 2024

SharePoint Rest API threshold exception even if the first part of filter not have enough 5000 items

I have a list WTasks around 40.000 items. And the first part of filter not reach 5000 items, but still got Threshold exception
Fields:

- UserId (just Number, not lookup) - indexed

- Status (lookup to the ItemStatus list by ID) - indexed

- ItemType (string) - indexed

All are indexed - single.


I do this Rest API call:
_api/web/lists/getbytitle('WTasks')/items?$top=2000&$filter=UserId eq 21 and ItemType eq 'Product Support'&$select=ID,Title

 

And got the threshold exception. I know this happened when the first part of filter return more than 5000 items (this case is "UserId eq 21").

 

But it actually just has 4.230 items that UserId = 21. 

And 3245 items match "UserId eq 21 and ItemType eq 'Product Support'"

I don't know why this happens with the list.

 

Please help on this.

Thanks a lot.

 
No RepliesBe the first to reply

Resources