locked
Include source folder in search result filtering RRS feed

  • Question

  • Hi,

    We are crawling old file shares that have basically all the metadata in the folder structure (folders define project, customer and location names).

    How do configure the search so that any documents under a folder matching the search string gets listed? By default the search only hits folders per se but not the child doucments.

    Br,
    Tom

    Tuesday, May 9, 2017 1:45 PM

Answers

  • Hi,

    Yes, this is by design.

    If you want to show all files under Presentaatiot folder, you need to search items via Path managed property.

    Or you can try to create a custom search result page by coding to achieve your requirement.

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Proposed as answer by Victoria Xia Monday, May 22, 2017 10:10 AM
    • Marked as answer by Devdumper Thursday, August 3, 2017 7:10 PM
    Tuesday, May 16, 2017 1:42 AM

All replies

  • Hi,

    SharePoint search provide “Path” managed property for file share. You can use it to filter file share content in search results or to customize your search result display template.

    For example, you can search “Path:\\sp\test\manager\*”, which will show all files under manager folder (include manager folder):

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, May 10, 2017 7:58 AM
  • Thank you for the reply.

    Is there a way to have the search directly consider the path in the search ranking?

    E.g. in this case if I would search only for "Presentaatiot" I would get only the folder, not the files within.


    • Edited by Devdumper Wednesday, May 10, 2017 12:23 PM
    Wednesday, May 10, 2017 12:22 PM
  • Hi,

    Yes, this is by design.

    If you want to show all files under Presentaatiot folder, you need to search items via Path managed property.

    Or you can try to create a custom search result page by coding to achieve your requirement.

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Proposed as answer by Victoria Xia Monday, May 22, 2017 10:10 AM
    • Marked as answer by Devdumper Thursday, August 3, 2017 7:10 PM
    Tuesday, May 16, 2017 1:42 AM