1. Document Library Pro
  2. Advanced Usage

Adding advanced search to the document library

Document Library Pro comes with an instant AJAX search box which appears above the table. If you require more advanced search options then you can use it with SearchWP.

We have integrated Document Library Pro with SearchWP so that the two plugins will work perfectly together with no special configuration. This allows you to use all of SearchWP's powerful search functionality with your product tables, including:

  • Choose which data is searchable, including data that isn't usually indexed such as attributes and custom fields, and the content of supported file types.
  • Control how search results are ordered and prioritized.
  • Analytics and reporting on how people are using the search.

Setup instructions

This is how to use the two plugins together:

  1. Install Document Library Pro. Enable the lazy load option if you are displaying your document libraries in a table layout.
  2. Install SearchWP and make sure you have added the 'Documents'  dlp_document post type as a Source on the default SearchWP engine.
  3. Follow these instructions if you would like to index the content of your document downloads (e.g. PDFs) with SearchWP.

And that's it! When a customer uses the search box above your product tables, the results will be powered by SearchWP.

Adding search boxes elsewhere on your site

The instructions above will make SearchWP power the search box above your product tables. You can also use SearchWP to add search boxes elsewhere on your site.

This is how to do it:

  1. Install Document Library Pro. Enable the lazy load option if you are displaying your document libraries in a table layout.
  2. Install SearchWP and make sure you have added the 'Documents'  dlp_document post type as a Source on the default SearchWP engine.
  3. Finally, add the 'Document Library Pro: Search Box' widget or [doc_search] shortcode anywhere on your site, e.g. the homepage or a sidebar.

Once you have done this, customers can use the search box (which will be powered by SearchWP) wherever it appears on your site. The results will appear within a document library.

Indexing document download file content with SearchWP

SearchWP supports indexing the content of certain file types, for example PDFs or Office documents.

In order to allow SearchWP to index your document download files you can perform the following steps:

  1. Go to the SearchWP Engine settings and click 'Add/Remove Attributes' on the Documents source.
  2. In the Custom Fields dropdown, select the 'Document Library Pro: Document Downloads' option.
  3. Click 'Done' and rebuild your SearchWP index.

Please note that SearchWP tries it's best to index the content of PDFs and other text documents, however successful parsing is not guarranteed and dependant on the structure of the files.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.