Forum Discussion
Deleted
Aug 28, 2017Search a File issue
Hi, When I am trying to search for a file in a library it returns me unwanted files which don't meet my search keyword. For example in this picture: I am searching for "Yazaki" but it returns me other files as well.
- You can't force this (unless you build a custom search page), but you can use the phrase:
filename:yazaki
to search only the file name.
I mainly do this KQL type searching on search pages, but i believe most of it works on the individual library or list search as well.
7 Replies
- PBeiler1Steel ContributorKQL works nicely for searches in SharePoint Online, giving the ability to narrow the search. https://dev.office.com/sharepoint/docs/general-development/keyword-query-language-kql-syntax-reference
- DeletedIs it possible to search keyword in file name instead of content in the documents?
- Atul MogheBrass ContributorNo, there isn't any property given in OOTB webpart to change this behavior. You can make the the search box invisible if you want.
- Atul is correct,
When you perform a search in a document library, the keyword is going to be search in the following parts:
- File name.
- File content
- File metadata
- Atul MogheBrass ContributorMy guess is, your search term must be available in the metadata (properties of the document) or in the body of these documents. Please check if that is the case.