SearchBlox

SearchBlox Developer Hub

Welcome to the SearchBlox developer hub. Here you will find comprehensive guides and documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

Search Settings

Search results can be formatted through the Admin -> Results -> Settings page. Basic search settings such as sorting, hit highlighting, case sensitive search is common for all types of search. This page is accessible for both Admin and Business users Other settings and templates are applicable only to regular search.

Search Settings

Setting
Description

Results Per Page

Specifies the number of results per page. By default, the value is 10. It can be increased up to 500

Sorting

Specifies the type of sorting to be used while searching. By default, it is by relevance.

Hit Highlighting

Value is set to Yes or No based on whether the search terms need to be highlighted or not.

Case-Sensitive Search

Search can be made case sensitive or not by selecting Yes or No. By default, the value is No.

Search Form

Search will be performed on the first page or every page based on the selection. By default, it is every page.

Cluster Search Results

By setting this value to Yes, results will be clustered using the clustered.xsl template for search results.

Search Form

Search will be performed on the first page or every page, based on the selection. By default, it is every page.

Cluster Search Results

By setting this value to Yes, results will be clustered using the clustered.xsl template for search results.

Force Secured Search

By enabling Force Secured Search, both regular and faceted search are redirected to Secure Search.

Templates

SearchBlox provides the following templates. Templates can be modified or customized as needed.
category.xsl
clustered.xsl
default.xsl
eml.xsl
featured_results_top.xsl
frame.xsl
graph.xsl
highlight.xsl
opensearch.xsl
pagesort.xsl
rss.xsl
rss2.xsl
tabbed.xsl
url.xsl

Searchblox also displays results in the following formats:
XML
JSON

Search Templates

The various template formats that are available for selection are shown in the screenshot below. Select the desired format and click Save, and regular search results will be displayed in the required format going forward. Details on some of the popular templates are also given below.

  • By default, default.xml is used as the template.
  • To get the results in XML format, XML must be selected.
  • Similarly, JSON format is also available (which is highly used by developers.)
  • To get the featured results in regular search, users can select the featured_results_top.xsl option.
  • The highlight.xsl option creates a link called "highlight" beside each search result. By clicking the highlight link, you can see the search term highlighted on the search results page.
  • url.xsl can be used to get only the urls of the search results

Customizing Default Style

To customize the look and feel of the search results page, edit the default.xsl file under the stylesheets folder. To replace the SearchBlox logo with a company’s logo, find “logo.jpg” in the XSL file and replace it with a jpeg of the company’s logo. Place the company’s logo image file in the images folder under SearchBlox. To change other look and feel aspects of the page, edit the HTML as required.

Changing Search Results Display

The default XSL to be used can be specified in the Results tab of the Admin Console. To add a new template, place the style sheet file in the /searchblox/stylesheets folder.
To use a different XSL style sheet dynamically, pass the XSL parameter as part of the search request. For example:
http://localhost/searchblox/SearchServlet?query=time&xsl=new.xsl

Case-Sensitive Search

Case-sensitive search is a new feature available from the 8.3 build onwards. By default, case-sensitive search is enabled and all search terms are automatically converted to lower case in both regular and faceted search. Case-sensitive search is recommended to users who want to search abbreviations or those who use BOOLEAN operators such as AND, OR, and NOT. To enable case-sensitive search, set the value to “yes” for case-sensitive search.

Uploading Search Templates and Plugins

From version 8.5 onwards, custom templates for regular search and plugins for faceted search can be uploaded from search settings.

To upload a stylesheet, just upload the customized xsl file as shown below.

Next, find that template in your list of templates under Search Settings.
To upload the plugin, upload the zip file of the plugin.

Next, access the plugin using the link below:
http://localhost:8080/searchblox/angular/index.html#/

Make sure that in the zip file the plugin folder has been renamed to angular (or any name you prefer). You can find the folder in ../webapps/searchblox. If you need to replace the existing plugin folder, name the file plugin.zip. Also make sure that the archive file has the contents of the plugin folder only (i.e., index.html is available in that folder itself), otherwise your URL may vary based on the folder names used.

Secure Search Settings

Secure search settings can be configured in this tab under search settings.

SearchBlox supports three types of secured search. One is based on internal authentication, two is secure search based on active directory, and three is based on OKTA.

Featured Result

Featured results bring sponsored-search-like functionality to SearchBlox. Featured results can be configured in the Search section.

Preview

The search results can be previewed in a selected style sheet using the Preview tab under the Results menu.

Search Settings


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.