SharePoint REST API ViewsLifeTime null values when sorting
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [X] 💥 Microsoft Edge
- [X] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [ ] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
- browser version
- SPFx version
- Node.js version
- etc
Issue description
We are using REST Search API against SharePoint Online, having the requirement of sorting by ViewsLifeTime MP.
When we execute queries with a path filter, both sorting ascending and descending get proper results

When we filter by DepartmentId or use Multi Geo Search, both sorting ascending and descending result sets contains null values on first and last results.

Question is, is there a known limitation on sorting by ViewsXX Managed Properties (tried with ViewsLifeTime, ViewsRecent and others) when applying multi geo search or department id filter? Thanks in advanced for your support!
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
What kind of SharePoint Content are the first and last results?
What kind of SharePoint Content are the first and last results?
The first and last results are of content class STS_ListItem_Events
We're still facing the described behavior, no changes since June. Happy to help if more information is needed,
We're still facing the described behavior, no changes since June 2022. Happy to help if more information is needed.
Also wondering what it means when ViewsLifetime is empty or null. Was the item never visited? Or just created? Want to know if we can use the query ViewsLifetime<1 in Purview to apply clean up policy.