-
Notifications
You must be signed in to change notification settings - Fork 1k
Search API returns 2 items while TotalRows is greater #8648
Copy link
Copy link
Closed
Labels
area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APICategory: SharePoint Client Side Object Model SDK / REST APItype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Metadata
Metadata
Assignees
Labels
area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APICategory: SharePoint Client Side Object Model SDK / REST APItype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
I'm performing a search using the following:

_api/search/query?querytext=%27benedict%27&querytemplate=%27{searchterms}%20AND%20PECVStatus:3%27In this case, I know the querytext is part of a searchable managed property & PECVStatus is a queryable managed property. The query returns 2 results (rowCount), while stating there are a number of TotalRows of 6. If I search for other names that I know should also be found I have the same behaviour (2 results while more available).
It happens for some other querytexts even when not providing a querytemplate, but only some:

_api/search/query?querytext=%27Chris%27However, if I add startrow=1 to the request, the rowCount returned is correct (except I'm missing the first item).

_api/search/query?querytext=%27benedict%27&querytemplate=%27{searchterms}%20AND%20PECVStatus:3%27&startrow=1Steps to reproduce
Expected behavior
The number of results returned (RowCount) should be equal to TotalRows, at least in cases where RowLimit and RowsPerPage is not specified