question

HilseKonrad-0208 avatar image
0 Votes"
HilseKonrad-0208 asked Rei-6137 answered

Search using path

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-graph-search
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Rei-6137 avatar image
0 Votes"
Rei-6137 answered

@HilseKonrad-0208 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://docs.microsoft.com/en-us/answers/questions/702018/graph-api-search-for-driveitems-within-a-drive-ret.html

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.