SOLVED

Search a File issue

Deleted
Not applicable

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.

Capture1.JPG

7 Replies
My 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.
Is it possible to search keyword in file name instead of content in the documents?
No, 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
best response
Solution
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.
KQL 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-referen...

That is not entirely true. When you perform a search in a document library, the keyword is going to be search in the following parts: 
- Document title

- File name
- File content
- File metadata

What's not commonly known is that search is indexing a title of the document in document libraries and lists. By default the "Title" field is always indexed by search unless settings are updated to different configurations. 

The most common pitfall I observe in the organizations, is that people do not include title field in their views. They have tendecy to skip updating the library/list form, especially when it's not required. 

We also tend to give not very meanigful names as titles of our documents. Attempt to give your document a title using a natural language, that you and others would use when searching for it in the

future. If you do it the right way at the list/library level, that benefit carries over when searching a site as well. 

 

 

I usually work with teams and guide them how to publish internal documents to gain most value out of SharePoint. 

 

I hope this helps. 

1 best response

Accepted Solutions
best response
Solution
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.

View solution in original post