Search using path

Hilse, Konrad 1 Reputation point
2021-09-15T21:40:15.033+00:00

Greetings,

I was wondering how the path in the search API is supposed to work.
If I include folders of my document library in the path, files are missing in result.

When I use a query like
"query": {
"queryString": "\"KEY1*\" path:\"https://tenant.sharepoint.com/sites/SITE-ID/LIBRARY\""
},

I can find a file which name starts with KEY.
However, if I add the path where that file is located:
"query": {
"queryString": "\"KEY1*\" path:\"https://tenant.sharepoint.com/sites/SITE-ID/LIBRARY/PATH\""
},
The search returns nothing.

If I do the search with * as search string, I get only a fraction of the hits when using the path, although basically everything is located in that root level folder.

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rei 31 Reputation points
    2022-01-20T21:05:20.493+00:00

    @Hilse, Konrad Have you gotten any further on this issue? I've found the same. It seems to be related to indexable vs nonindexable files. Like .docx, .pdf all show up, but .png, .jpg, .ai files will not. I have posted a similar question here:
    https://learn.microsoft.com/en-us/answers/questions/702018/graph-api-search-for-driveitems-within-a-drive-ret.html

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.