Additional Data

This chapter runs you through the process of indexing the additional available data sets to a new collection in Solr and configuring collections in the Panl server and viewing the results.

In some instances, this book also references additional datasets which the Quick Start - The 5 Steps, and the Getting Started sections do not explicitly include commands and instructions for setting up.  Some references are made to the additional data whilst working through this book, whilst not necessary to have the datasets indexed, they showcase additional functionality which may be of use.

The steps are the same for any data set once the Solr search server has been set up, quick instructions are included for your reference.

All Data Panl Server

There is an additional Panl configuration file located at sample/panl/all/panl.properties which, once all additional data has been indexed (including the Bookstore Walkthrough Example), will provide access to all CaFUPs.  Remember: Panl was designed to have multiple CaFUPs connecting to multiple Solr collections.

The 'all' panl.properties file binds the following Solr collections to the Panl CaFUPs:

Solr Collection

Panl CaFUPs

simple-date

simple-date

  • An example data set showing DATE Range facets

mechanical-pencils

mechanical-pencils

  • The default dataset based on the Mechanical Pencils data

mechanical-pencils-or

  • The same dataset as above, but using an OR facet for the brand facet

mechanical-pencils-or-separator

  • The same dataset as above, but using an OR facet with a separator for the brand facet

mechanical-pencils-more

  • The same dataset with the 'More Facet' links available

mechanical-pencils-multi-separator

  • The same dataset with the Multi Separator' links available

book-store

book-store

  • The data set for the walkthrough section in building your own collection and interface.

book-store-hl

  • The data set for the walkthrough section in building your own collection and interface with highlighting enabled

author-alphabetical

  • The data set for the Bookstore chapter with a different ruleset for displaying facets.


Simple Date

The simple-date sample collection includes randomly generated dates from NOW to  approximately +/- 10 years from the date of writing this book to test the DATE range functionality and faceting.

The Simple Date dataset provides additional examples for the following Panl configuration functionality:

  1. DATE range facets

Creating and Indexing the Data

To index the data, ensure that you have created the Solr collection first, then post the file that contains the data to the Solr server.

Windows Commands

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin\solr.cmd create -c simple-date -d ↩
PANL_INSTALL_DIRECTORY\sample\solr\simple-date\ -sh 2 -rf 2

bin\solr.cmd post -c simple-date ↩
PANL_INSTALL_DIRECTORY\sample\data\simple-date\simple-date.json


*NIX Commands

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin/solr create -c simple-date -d ↩
PANL_INSTALL_DIRECTORY/sample/solr/simple-date/ -sh 2 -rf 2

bin/solr post -c simple-date ↩
PANL_INSTALL_DIRECTORY/sample/data/simple-date/simple-date.json

panl.properties File Additions

You will need to include (or update) the following line in the panl.properties file.

panl.collection.simple-date=PANL_INSTALL_DIRECTORY/sample/panl/simple-date/simple-date.panl.properties

After restarting the Panl server, the new CaFUPS will appear in the Panl Results Viewer, the Panl Results Explainer, and the Single Search Page web apps.

Mechanical Pencils OR Facet

The mechanical-pencils-or sample collection includes configuration that configures the brand facet as an OR facet so that more than one brand may be selected for the facet.

There is an additional configuration for using the OR separator between the values, rather than individual values.

Creating and Indexing the Data

This is a Panl configuration change, not a Solr configuration change and connects to the existing mechanical-pencils Solr collection and data which has been setup.

Nothing needs to be done for the Solr server configuration as it already holds the collection.  This is just a simple example of how Panl can present different faceting information without having to re-index the data.

panl.properties File Additions

You will need to include (or update) the following line in the panl.properties file.

panl.collection.mechanical-pencils=PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils-or/mechanical-pencils-or.panl.properties

And for the OR separator functionality, you will need to include (or update) the following.

panl.collection.mechanical-pencils=PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils-or/mechanical-pencils-or-separator.panl.properties

Notes: You may want to run both the configurations at the same time to see the differences, in which case the above configuration line would become:

panl.collection.mechanical-pencils=PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils/mechanical-pencils.panl.properties,PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils-or/mechanical-pencils-or.panl.properties


After restarting the Panl server, the new CaFUPS will appear in the Panl Results Viewer, the Panl Results Explainer, and the Single Search Page web apps.

Mechanical Pencils More Facets

The mechanical-pencils-more sample collection includes configuration that reduces the maximum number of facets to be returned to 10.  This will enable the Panl Results Viewer to generate 'See all...' links for facets that have not returned the complete list of facets for the query.

Creating and Indexing the Data

This is a Panl configuration change, not a Solr configuration change and connects to the existing mechanical-pencils Solr collection and data which has been setup.

Nothing needs to be done for the Solr server configuration as it already holds the collection.  This is just a simple example of how Panl can present different faceting information without having to re-index the data.

panl.properties File Additions

You will need to include (or update) the following line in the panl.properties file.

panl.collection.mechanical-pencils=PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils/mechanical-pencils-more.panl.properties

Notes: You may want to run both the configurations at the same time to see the differences, in which case the above configuration line would become:

panl.collection.mechanical-pencils=PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils/mechanical-pencils.panl.properties,PANL_INSTALL_DIRECTORY/sample/panl/mechanical-pencils-more/mechanical-pencils-more.panl.properties


Panl will automatically add the new CaFUPS to the Panl Results Viewer and Panl Results Explainer web apps.

Bookstore

To help understanding, and to give a bit of practice, the adding and indexing of this dataset is covered in the Bookstore walkthrough chapter, which also describes the complete process from idea, to data requirements, to indexing, and finally surfacing the data through Panl.

This example will also include implementations of the following:

  1. Specific Solr Search Field, and
  2. BOOLEAN checkboxes

Tips: Ensure that you have worked through the Bookstore chapter before indexing the data.  The process and  the background to the data provides insight into the decisions made with the data and will help you make better decisions when working through your own datasets.

~ ~ ~ * ~ ~ ~