none
How to disable Folder from search result? RRS feed

All replies

  • Hi, Ameenah,

    First you can add "isDocument=1" in your query to remove folders from the search results. Or just edit the search result web part and change the query to remove folders. Here is a tutorial you can check and try. 

    Best Regards

    Jerry


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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by KumarMohiT Monday, September 30, 2019 10:15 AM
    Monday, September 30, 2019 8:56 AM
  • Using the Advanced Attributes in Properties for Either Files and Folders

    1. Open File Explore Click the File Explorer taskbar icon which resembles a file folder.

    Alternatively, press the Win + E keys simultaneously.

    2. Navigate to the item you wish to hide. This method works for both files and folders.


    3. Open the item Properties. Right-click the item and click Properties from the context menu.

    You can also click the "Properties" option in the ribbon, which is present in the Windows 10 and 8 File Explorer.

    4. Open Advanced Attributes. Click the Advanced button towards the bottom of the Properties window, on the same line as "Attributes:" and the checkboxes.


    5 Uncheck:

    For files: allow this file to have contents indexed in addition to file properties

    For folders: allow files in this folder to have contents indexed in addition to file properties.

    6. Click the OK button in the Advanced Attributes window.


    7. Click the OK or Apply button in the Properties window.

    The only difference between the two is that clicking OK will save your changes and close the window, whereasApply will save your changes while leaving the Properties window open.

    8. Confirm the attribute changes, if you've opted to de-index a folder. You'll be asked to confirm that you want to disable indexing. Ensure the radio button next to "Apply changes to this folder, subfolders and files" is selected, then click OK.


    Monday, September 30, 2019 9:17 AM
  • Thank You for your response.

    But its not working. There is no item/search result display when searching. Below is my setting. Is there any incorrect?

    Thank You

    Tuesday, October 1, 2019 2:51 AM
  • Hi, Ameenah,

    Please use the Query in my screenshot.  It is "{searchboxquery}   -ContentTypeId:0x0120*" Then you can go test tab and try some keyword. 

    Best Regards

    Jerry


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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by Michael Han6 Wednesday, October 2, 2019 8:05 AM
    Tuesday, October 1, 2019 5:49 AM
  • Hi, Ameenah,

    Have you tried the new query? Is there any further concerns about the solution? If you find it helpful, please mark the reply as answer. 

    Best Regards

    Jerry


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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, October 7, 2019 8:12 AM