You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run a search query to get ViewsLifeTime & ViewsLifeTimeUniqueUsers for pages in our SharePoint tenant, however the table being returned for each query is empty.
If I follow down results.value.PrimaryQueryResult.RelevantResults.Table there are no rows / key/value pairs, and if I attempt using the get_property() func to isolate a property, it does not find it.
If the query is executed in a browser (e.g. https://{site}.sharepoint.com/_api/search/query?querytext='path:{url of page}') this returns the required data in the SimpleDataTable table
Looking at other issues I also tried:
search = SearchService(ctx)
request = SearchRequest(query_text="path:{url of page}")
result = search.post_query(request).execute_query()
However this returns an error of ('-1, Microsoft.Data.OData.ODataException', "Incompatible type kinds were found. The type 'Microsoft.Office.Server.Search.REST.SearchRequest' was found to be of kind 'Complex' instead of the expected kind 'Primitive'.", '400 Client Error: Bad Request for url: {url of page}).
Am I missing something?
Cheers,
James
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to run a search query to get ViewsLifeTime & ViewsLifeTimeUniqueUsers for pages in our SharePoint tenant, however the table being returned for each query is empty.
If I follow down results.value.PrimaryQueryResult.RelevantResults.Table there are no rows / key/value pairs, and if I attempt using the get_property() func to isolate a property, it does not find it.
If the query is executed in a browser (e.g. https://{site}.sharepoint.com/_api/search/query?querytext='path:{url of page}') this returns the required data in the SimpleDataTable table
Looking at other issues I also tried:
However this returns an error of ('-1, Microsoft.Data.OData.ODataException', "Incompatible type kinds were found. The type 'Microsoft.Office.Server.Search.REST.SearchRequest' was found to be of kind 'Complex' instead of the expected kind 'Primitive'.", '400 Client Error: Bad Request for url: {url of page}).
Am I missing something?
Cheers,
James
The text was updated successfully, but these errors were encountered: