I have created a custom Results Source that looks at a specific Document Library within my SharePoint site and a search box/results page to allow it to be searched.

I am having an issue though, as the search results only return the folders in which a search term is found, rather than the individual files, and I can't figure out why.

I have tried setting IsDocument:1 and using the ListItem class but to no avail. Has anyone got any other ideas what I can try?

The Document Library has been indexed and is available for searching.

  • do you have any search query rules? Did you run a inc/full crawl? Also, what does your query look like, and your result source say?
    – Mike
    Commented Dec 18, 2017 at 17:23
  • hi mike. my query within my Result Source is: searchTerms} Path:xyz/Team%20Documents* (contentclass:STS_ListItem OR IsDocument:True)
    – KevSP
    Commented Dec 20, 2017 at 11:02

1 Answer 1

  1. If you search a file name in the Team Documents library, will it be returned?
  2. Are these files crawled successfully?
  3. Check if the search display template displays all files as a folder type.
  4. Does default result source work fine?
  5. Check query rule in CA to see if it's configured to show folders.
  • Hi Max. I have tried searching the file name within the document library itself and it is only showing the folder, not the files individually. I have not seen this before as I have other libraries on other SharePoint sites I manage that will return the files when a term is search within the search box on the doc library. is there a setting somewhere I need to update?
    – KevSP
    Commented Dec 27, 2017 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.