0

In my SharePoint Online, I have a content query web part that I have configured to show 5 recent items from a subsite and sort by Modified but I'm not getting any results and the error message about query throttling limit appears (probably because the total items in the site is more than 5k). I am aware that the query will not work if the total items to be queried is more than 5k items however it works when I query a specific library with more than 5k items. Here is my scenario and test cases:

Subsite 1:

  • Library 1 (4k items)
  • Library 2 (2k items)

Subsite 2:

  • Library 3 (8k items)

Subsite 3:

  • Library 4 (1k items)

Test cases

  1. Query Subsite 1 = No results
  2. Query Subsite 2 = No results
  3. Query Subsite 3 = Shows results
  4. Query Library 1 = Shows results
  5. Query Library 3 = Shows results

I am confused now as to how the query is able to run against a library with 8k items but not able to run query against a site with total items of more than 5k.

0

The issue you are facing is related to the total amount of items. If you are querying subsite 1 you effectively query 6k (lib 1 + lib 2) items which is above the threshold. Most probably you need to create index on the modified date to make the query work.

  • Thank you for your answer! However I did try to indexed the Modified column in every library in Subsite 1 but still the query did not work. At one point, I swear it works but a few minutes later after publishing the page, no results again. If the query is checking against the total items in the subsite, it does not explain how I am able to successfully query Library 3 directly. – aearwen Mar 1 at 8:49
  • Can you share in your original question how the content query wp is configured when you query the subsite 1? – Marek Sarad Mar 1 at 9:53
  • Sorry for the late update. I was able to overcome this issue by using SPServices. – aearwen Mar 22 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.