Understanding Site Search & Search Box Widget

Apache Solr Search

OpenScholar uses Apache Solr as the search functionality/platform. Apache Solr is an open source search platform built upon a Java library called Lucene.

Solr is a popular search platform for Web sites because it can index and search multiple sites and return recommendations for related content based on the search query’s taxonomy. Solr is also a popular search platform for enterprise search because it can be used to index and search documents and email attachments. 

Search Box Basics

search box widgetYou can allow the ability for your site visitors to search your site by placing the Search Box widget in the layout of your site. The site search results include all posts you've added to your site.


Search bar
Example of the search bar that will be displayed

Learn about Customizing Your Site's Layout

Adding the Search Box Widget to Your Site

  1. Navigate to the Layout of your site via the Configuration Gear or via Control Panel
  2. Search within the Widget Gallery for the widget entitled “Search Box”
    search box widget in gallery
  3. Drag & drop that widget into the layout of your site
    search box
  4. Click the Save button at the bottom of your site.

Best Practices when using the Search Box Widget

Consider adding the Search Box Widget to “All Sections” of your layout so your site visitors can use the search no matter where they are on the site.

Consider placing your Search Box Widget in the header (above your Primary Menu) so it’s visible to your site visitors.

What is indexing?

When your site is "indexed", this means that the content of your site is scanned or read by search engines (Google, Bing, etc.) to provide search results to your users.  

OpenScholar indexes your site content shortly after it is added/updated so it will appear in the site search results.

Content on your site is indexed into search and can be searched on via the search widget.  

Understanding Search Results

Once you search you can sort by:

  • Author
  • Title
  • Date created
  • Type of content

You can also filter by:

  • Post Date
  • Post Type
  • Existing taxonomy term(s) (tag).
    Learn about Taxonomy.

example search result

Tips for better Site Search Results

By default the search results are ranked by relevance. Relevance is determined by how many times your search term is present on a page and which part of the page contains the search term. 

For example, the Title of your page is given a higher rank than the content in the body of the page. The order of importance for a page is set as:

  1. Page Title or the content inside of H1 tags
  2. Content inside H2 or H3 tags or the name of the author
  3. Content inside H4, H5 or H6 tags or taxonomy term names
  4. Content inside EM or STRONG tags or text in the body field
  5. All other content

example search result

Learn more about Formatting Text using the text editor on OpenScholar.

Any content in a published post will be indexed.  Additionally, content in the Custom Text/HTML widgets that are added to a individual page will be indexed and included in the keyword match.

How to get subsite search results from parent site

If your site has child sites, the site search from the parent site can search across all child sites. 

  1. To set this up, go to your website and in the url address bar, add "/search" to the current url path. For example, to set the search for this documentation site, I'd go to 'http://docs.openscholar.harvard.edu/search".
  2. On this page, select the big grey gear and select "Search settings".

search settings


Choose which sites to search

You set up Search to pull results from other OpenScholar sites in your site's results.

  1. To include search results from all Subsites, check the "Subsites" box.
  2. You can also hand select individual OpenScholar sites. Choose by typing the site name and the field will lookup the site automatically.

search settings

Controlling the Search Layout

As a Site Administrator or Owner, you can control what filters show on specific search results pages to best help your site visitors get what they need.

How to Control the Search Layout:

  1. Click the Configuration Gear on the search result page you are going to alter
  2. Select Layout
    section layout
  3. Make changes
    search layout
  4. Click the Save button


Updated: 9Aug18