Feb 08 2023 11:01 PM
Feb 08 2023 11:01 PM
Using Search Query from the top of a SharePoint site;
path:""https://contoso.sharepoint.com/teams/MyHubSite-Imagery/Renders/" (filetype:jpg OR filetype:png OR filetype:gif)
Either of these return all stored pictures from the "Renders" Document Library.
But as the "Renders" Document Library contains many images, too many image matched search results are returned when searching the entire Document Library - making these broad queries rather undesirable to use as a search.
Knowing that each image is saved within its own project folder, we're looking for search techniques to refine the image search using the name of their directory.
But when we try the following search query;
The folder called "Example Project" is returned itself, but the image files within the folder "Example Project" do not return from the search query.
In the previous search of the entire Document Library, all of the contents of "Example Project" absolutely returned, but mixed in with the entire contents of that Document Library, it was an impracticable search to do, as it returns all images - but we couldn't help but note that the images that we were looking for were returned with the countless others. All we're needing is to refine the search down to that images sub-directory.
The image names themselves are random, unfortunately.
Has anyone any suggestions on how to structure a SharePoint Online search term that will find files within a directory of a Document Library?
Or are we facing an inevitable outcome of adding a Project Name column, and updating the metadata of each and every image file with its Project Name (the folder each image resides in), and then indexing that Project Name column?
Feb 09 2023 01:16 AM
@Karllight I just tested this on our SharePoint site and I am able to search for files within a specific folder using query like:
path: "https://contoso.sharepoint.com/sites/SPConnect/Shared Documents/folder1"
Folder contents in library:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Feb 09 2023 01:33 AM
the "path" property works with subfolders in general
Document library with subfolder "Example Project" and even a subfolder
I think something else is the problem in your case...
Could you try uploading a brand new image into the "Example Projekt" folder?
Do you set other search settings?
Feb 09 2023 01:31 PM