The AngularJS-based database search front-end for SearchBlox can be used for a grid-based result for database, CSV and MongoDB collections.
Follow these steps to install and configure the Angular JS plugin:
- Remove or rename the existing plugin folder in ../webapps/searchblox.
- Download the zip file from https://github.com/searchblox/database-search and expand the folder into the SearchBlox installation under ..webapps/searchblox.
- Access the AngularJS based search page at http://localhost:8080/searchblox/plugin/index.html.
- Edit the /plugin/data/facet.json file to add/modify/remove the term, number range and date range filters.
- Add sorting options and faceted search options on the facet.json file.
Facet.json is the configuration file that provides options for your search results as required. After placing the plugin folder in SearchBlox, the path for facet.json file is ../webapps/searchblox/plugin/data/facet.json.
To add a new facet filter, define the field name, display name and the size of the filter values to be shown in facet.json.
You can create visualizations by clicking the Create Visualization button at the top right-hand corner above the search results.
Configuring Database Collection Results
Sample database result in JSON:
Changes in facet.json grid columns:
Results in AngularJS faceted search:
Sample CSV collection and MongoDB collection results grid:
Configuring CSV and MongoDB collections is similar to database collection configuration. Sample results are shown below:
In MongoDB, there is no source attribute so the attribute name can be directly given: