Searching the document library

Hosted Document Library Pro has flexible search built in, making it easy for visitors to find documents by typing a search term. You can use search on its own or alongside filters, which let people narrow the list by choosing from a set of predefined options.

Search box above the document library

By default, your library shows a search box above the table or grid, at the top right. Visitors can type into it to instantly narrow the list to documents matching their term.

In this example, the visitor has typed “policy” into the search box, which has narrowed the table to the two matching documents:

Document library search term option

You can also move the search box or hide it in the Library Builder.

Search logic

When you are using the table layout without folders enabled, the search box searches all the data in the library, so visitors can search by category, tag, date and so on.

When you are using the grid layout, or the table layout with folders enabled, search works differently. Instead of searching the contents of the table, it looks in the document title, excerpt and full content (whether or not those fields are visible in the library). This is because the full set of documents has not been loaded into the view yet, so search falls back to indexing the title, excerpt and content.

If you want visitors to find documents by other information in these modes, you have two options:

  • Add the extra detail into the title, excerpt or content so it becomes searchable.
  • List categories, tags or taxonomies as filter dropdowns so visitors can narrow the library that way instead.

Can I search the contents of PDFs or files in the library?

The search box cannot read inside attached PDFs or downloadable files. It indexes the information shown in the library and the title, excerpt and content of each document, but not the contents of the files themselves.

If visitors need to find documents by topic, label each one with categories, tags or taxonomies that match the words people are likely to search for. You can then add these as filter dropdowns above the table, giving visitors an easy way to find files even though the file contents are not searchable.

How does search treat accents and special characters?

Search is an exact match, so only results that match each word in the query appear. For example, a search for “Telefono” will not return “Teléfono”.

To let accented and unaccented characters match each other, switch on the accent-insensitive search option.

More in Building your library