Hi
I'm trying to use the Graph API to do search on my Document Library to avoid delegation warnings.
What I'm trying to do initially is to be able to user Graph Explorer to be able to do the proper filtering and after that I will use this via PowerApp.
My document library is called TransmittalAttachments. In this document library, I've added extra columns (document metadata). Those extra columns are of type lookup value (linked to SP List).
What I want to do is to be able to search this document library using the name or title (which is working fine) and also search based on the additional metadata columns that I created.
This is the request body that I used and is working fine when I'm doing the search based on title:
{
"requests": [
{
"entityTypes": [
"driveItem"
],
"query": {
"queryString": "(name:Hive OR Title:Hive) AND path:\"https://MY SHAREPOINT SITE/TransmittalAttachments\""
},
"from": 0,
"size": 25
}
This returns to me only the item(s) that has this keyword in the Name or Title.
When I try to do the same searching for specific value for a lookup fields (called OrgCode) using this bod request:
{
"requests": [
{
"entityTypes": [
"driveItem"
],
"query": {
"queryString": "(OrgCode:SRG) AND path:\"https://MY SHAREPOINT SITE/TransmittalAttachments\""
},
"from": 0,
"size": 25
}
I get 0 results.
I tried columns with other data types such as text, same thing, I get 0 results. So, I don't think it's related with the data type. I think it's to do with the column.
So, why I'm not getting any results?