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
You 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.
Example of the search bar that will be displayed
Learn about Customizing Your Site's Layout
- Navigate to the Layout of your site via the Configuration Gear or via Control Panel
- Search within the Widget Gallery for the widget entitled “Search Box”
- Drag & drop that widget into the layout of your site
- Click the Save button at the bottom of your site.
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.
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.
Once you search you can sort by:
You can also filter by:
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:
- Page Title or the content inside of H1 tags
- Content inside H2 or H3 tags or the name of the author
- Content inside H4, H5 or H6 tags or taxonomy term names
- Content inside EM or STRONG tags or text in the body field
- All other content
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.
If your site has child sites, the site search from the parent site can search across all child sites.
- 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".
- On this page, select the big grey gear and select "Search settings".
You set up Search to pull results from other OpenScholar sites in your site's results.
- To include search results from all Subsites, check the "Subsites" box.
- You can also hand select individual OpenScholar sites. Choose by typing the site name and the field will lookup the site automatically.
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:
- Click the Configuration Gear on the search result page you are going to alter
- Select Layout
- Make changes
- Click the Save button