File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -54,3 +54,18 @@ GET http://{site_url}/_api/search/query?querytext='sharepoint indexdocid>20'&
54
54
```
55
55
56
56
And so on for the rest of the pages.
57
+
58
+ To use the same approach in CSOM, see the following example:
59
+ ``` C#
60
+ .. .
61
+ if (startRow == 0 ) // When issueing the query for first time, we don't have a DocId value yet
62
+ keywordQuery .QueryText = " sharepoint" ;
63
+ else // Putting the IndexDocId first and then the 'actual' query matters (in this case searching for the keyword 'sharepoint')
64
+ keywordQuery .QueryText = string .Format (" IndexDocId > {0} AND (sharepoint)" , startRow );
65
+ keywordQuery .EnableSorting = true ;
66
+ keywordQuery .SortList .Add (" [DocId]" , Microsoft .SharePoint .Client .Search .Query .SortDirection .Ascending );
67
+ .. .
68
+ ```
69
+
70
+ > [ !NOTE]
71
+ > When using the SortList in search queries, the fieldname being used must be enclosed by brackets (e.g. ` [DocId] ` ).
You can’t perform that action at this time.
0 commit comments