user3506401
user3506401

Reputation: 63

Supported search queries with OneDrive

What values the 'search-text' can take in the following query?

GET /me/drive/root/search(q='{search-text}')

From experiments, it looks like the {search-text} is a single string that would be searched in the contents of the file. Meaning if the search text is a multiple word sentence then entire sentence is searched rather than individual works in the sentence? Is this right assumption?

Eg: Say If I would like to search 'word1' 'word2' ... 'wordn' then it looks like search query should be issued for all the n words individually. Is there a format/way in which we can search all the n words in single query?

Thanks, /Girish BK

Upvotes: 5

Views: 1278

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

Searching is phrase based and does not support wildcards or similar search augmentations.

For example, the query /me/drive/search(q='pizza shop') would search for files that contain the phrase "pizza shop" in a filename, a file's metadata, and a file's content.

Upvotes: 3

Related Questions