How can I control my search so that only search in single level of folder or nested level of folder.
I want to implement search such that I can do search on First level of folders and files rather that searching on nested folders.
Deafult behaviour is it search under each nested folder for specified path.
My current code is
SearchRequest request = new SearchRequest();
request.Query = new SearchQuery { QueryString = searchTerm };
request.EntityTypes = new List<EntityType?> { EntityType.DriveItem };
request.Size = limitReturns;
QueryPostRequestBody qprb = new QueryPostRequestBody();
qprb.Requests = new List<SearchRequest> { request };
var responce = graphServiceClient.Search.Query.PostAsQueryPostResponseAsync(qprb).Result;
Please suggest.