Better search in SharePoint online for a document library over 5K

Sean Kuchle 41 Reputation points
2023-03-16T20:04:33.74+00:00

We have a modern document library with over 5K items in it. We often need to search this library and like the meta data that comes up in the search. But in order to have this large of a document library I need to use a filter (today - 1year) on the view so it works. The problem is the regular search box at the top will only search what is in the view and not anything past. To search everything my users need to click "Expand search to all items in this site" at the bottom but these results are just a list and no meta data is shown.

I'm looking for a way around this. I know in SharePoint classic there used to be a search web part but I don't see that in modern. I'm also wondering if this is something PowerApps can help with, maybe a search app?

I'm open to any options, thank you in advance for your help.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,621 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
{count} votes

Accepted answer
  1. Yanli Jiang - MSFT 21,446 Reputation points Microsoft Vendor
    2023-03-17T08:52:30.9933333+00:00

    Hi @Sean Kuchle ,

    You can try the following method to add metadata to search results.

    1. Activate Publishing Feature both at Site collection features and Site Features page.
    2. Get the Managed Property name for your list column. You can verify it from Site settings >> Click on “Search schema “under the “Site Collection Administration” section. Use search to enter the name of your property and verify its mapping.
    3. Open the site collection in SharePoint Designer, and navigate to folder “Search” folder under “Display Templates”.
    4. Copy and paste: Item_default.html file, and rename the copied file into something relevant. E.g., “IC_Documents.html”
    5. Edit the IC_documents.html file in SharePoint Designer
      • Change the “Title” Tag value to: <title>IC Documents</title>
      • Append your Metadata property to the “ManagedPropertyMapping” tag.
      • Add your custom property in <Body> section next to ” #=ctx.RenderBody(ctx)=#
      • Save and close the file.
    6. Edit Results.aspx page, edit the “Search Results” web part, and set its display template: Under properties, set the “Use a single template to display items” option and select “IC Documents” from the list. Click OK and stop editing the search results page. 
    7. That’s all.

    For more information, please refer to:

    https://www.sharepointdiary.com/2019/02/sharepoint-online-add-metadata-to-search-results.html

    https://learn.microsoft.com/en-us/sharepoint/make-site-content-searchable

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Regarding whether PowerApps can meet your needs, I suggest you start a new discussion via the Power Apps Community so that you can get dedicated support on this issue.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful