0

I have a list contains more than 20000 items and the number will increase. I need to query list items using caml query from javaScript. When I am using the next query, it fails.

"<View><Query><Where><Contains><FieldRef Name='Title'/><Value Type='Text'>some title</Value></Contains></Where><OrderBy><FieldRef Name='Modified' Ascending='False' /></OrderBy></Query><RowLimit>1</RowLimit></View>"

it is not possible to change the list view threshold. Is there any way to query this list using caml query from javaScript code?

1 Answers1

0

You can index the list on the column you want to query, which is Title in your case. You can find a wonderful article on managing large list and libraries here

Vineet Desai
  • 872
  • 5
  • 16
  • Thanks Vineet for your answer. I always face this error while trying to create an indexed column "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator." – Mahmoud Magd Mar 16 '16 at 13:42
  • Unfortunately, you will not be able to create new indices for the list if the threshold limit has already exceeded. In this case you can try to fetch the results using paging, however the performance will be slow. You can refer the article http://www.codeproject.com/Articles/1076854/Overcoming-the-List-View-Threshold-in-SharePoint-C – Vineet Desai Mar 17 '16 at 18:55