Apr 06 2020 11:51 PM
Apr 06 2020 11:51 PM
I am using caml query as below:
"<View><Query><Where><And><Eq><FieldRef Name = 'NumericRecordId'/><Value Type = 'Integer'>xxxxxxx</Value></Eq><Eq><FieldRef Name = 'ContextId'/><Value Type = 'Integer'>xxxxxx</Value></Eq></And></Where><View><OrderBy><FieldRef Name='NumericRecordId' Ascending='False' /></View></Query><ViewFields><FieldRef Name='Title' /></ViewFields><RowLimit>100</RowLimit></View>"
This works fine for records less than 5000 in my document library. But once it exceeds 5000 i get threshold error.
ContextId and NumericRecordId are Indexed columns. I tried many different online solutions but not able to get through this. Any help will be much appreciated. Thanks
Apr 07 2020 12:55 AM
Apr 07 2020 01:57 AM
@Juan Carlos González Martín Thanks for your suggestion . can you just provide an example on how to call them with multiple parameters and integrate them?
Apr 12 2020 09:04 PM - edited Apr 13 2020 01:24 AM
@Juan Carlos González Martín I tried with the search api's as well and again ran into same issue after 5000 records as api returns 500 (Internal Server Error) while applying filters.
Apr 13 2020 04:46 AM
@Ankush_Daga Have you tried using PnPJS with paged items method. Please refer the below link
Please refer the below link using Search API using PnPJS
Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
Apr 13 2020 05:23 AM
Apr 13 2020 05:33 AM
@Ankush_Daga Can you refer the below links and let me know if it suits you.
Apr 13 2020 05:51 AM - edited Apr 13 2020 05:59 AM
@Sudharsan K I have already tried using 'ListItemCollectionPosition' . It works fine with records less than 5000 but once my document library exceeds files count then it throws the threshold error. So without removing 'Where' clause from the query or 'Filters' from the api's it throws an error (possibly due to threshold limit). If i remove this where clause or filter then it works fine with row limit as well as pagination. But this is again a perfromance hit as It will be bringing all the records rather than filtering them. So i am looking for some approach in which it works with where (caml query) or filter (Rest api's).
Apr 13 2020 05:58 AM - edited Apr 13 2020 05:58 AM
Have you tried using query.QueryThrottleMode = SPQueryThrottleOption.Override;
Refer the below link too