Quick Start - The 5 Steps

At the end of this chapter, you will have a web app up and running with the mechanical pencils collection indexed and ready to search, sort, and facet on the URL:

http://localhost:8181/panl-results-viewer/ 

IMPORTANT: This is the Quick Start guide for Solr version 9, if you are using a previous version of Panl, ensure that you have the correct Panl release package and that you refer to the Setting up a Solr 7 or 8 server section in the Appendix for how to index data for those versions.

If you are not using the Solr version 9.10.0, you may need to run different commands to create and index the data - see the Solr Versions Command Line Options section in the Getting Started chapter for more details.



Image: The In-Build Panl Results Viewer web app, with the mechanical pencils CaFUPs shown

Operating System Dependent Notes

These are the commands for either Microsoft Windows or *NIX operating systems (Linux/Apple Macintosh).  Should there be any errors - see the 'Getting Started' section for a more in-depth explanation and approach.

IMPORTANT: Throughout the book the filesystem paths are described using the *NIX standard of a forward slash '/' between the directories, rather than the backslash of Microsoft Windows systems '\'.  So please take care when copying the commands.

Step 0. Download and Extract the Solr and Panl Packages

Download the latest release of Synapticloop Panl - this book is using the solr-panl-9-2.2.0 version:

https://github.com/synapticloop/panl/releases

Download the latest version of Apache Solr - this book is using the 9.10.0-slim version:

https://solr.apache.org/downloads.html

If the version of Solr has moved on since the writing of the book, to find the 9.10.0-slim version, it will be able to be found in one of the following locations:

https://archive.apache.org/dist/solr/solr/
(this URL contains all versions of the latest major release packages - i.e. if the latest version of Solr is 9, then this will contain all 9.*.* versions).

OR

https://archive.apache.org/dist/lucene/solr/
(this URL contains all versions before the latest major release packages - i.e. if the latest version of Solr is 9, then this will contain all versions up to the latest 8.*.* versions).

Extract both the packages, either through the command line, or with a GUI utility.  For the examples in this section, the Panl server was extracted to:

\java-servers\solr-panl-9-2.2.0\ (labeled in this book as PANL_INSTALL_DIRECTORY)

And

\java-servers\solr.10.0-slim\ (labeled in this book as SOLR_INSTALL_DIRECTORY)

Windows Commands

If you are not using a Microsoft Windows based operating system see the section on  *NIX Commands.

IMPORTANT: Each of the commands - either Windows or *NIX must be run on a single line - watch out for  continuations.

Step 1. Create an example cloud instance

This requires no interaction, will use the default Solr configuration with two replicas, and two shards under the 'example' cloud node.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin\solr.cmd start -e cloud --no-prompt

Step 2. Create the mechanical pencils collection

This will create and configure the mechanical pencil collection based on the schema so that the data can be indexed.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin\solr.cmd create -c mechanical-pencils -d ↩
PANL_INSTALL_DIRECTORY\sample\solr\mechanical-pencils\ --shards 2 -rf 2

Step 3. Index the mechanical pencils data

This will index the included sample mechanical pencil data into the Solr instance in the mechanical-pencils collection.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin\solr.cmd post -c mechanical-pencils ↩
PANL_INSTALL_DIRECTORY\sample\data\mechanical-pencils.json

Step 4. Start the Panl Server

This will start the server and be ready to accept requests.

Command(s)

cd PANL_INSTALL_DIRECTORY

bin\panl.bat server -properties ↩
PANL_INSTALL_DIRECTORY\sample\panl\mechanical-properties\panl.properties

Step 5. Browse the in-built Panl Results Viewer web app

Open the link

http://localhost:8181/panl-results-viewer/ 

in your favourite browser, choose a collection/FieldSet and search, facet, sort, paginate and view the results

Need help understanding what the Panl server is doing?

You may either click on the [Explain] link on the Panl Results Viewer, or open the link

http://localhost:8181/panl-results-explainer/ 

in your favourite browser, choose a collection and fieldset, paste the canonical URL path from the results viewer and an explanation of the parsing and decoding and the configuration will be presented.

*NIX Commands

If you are not using a *NIX based operating system (e.g. Linux, Apple Macintosh) see the section on Windows Commands.

IMPORTANT: Each of the commands - either Windows or *NIX must be run on a single line - watch out for  continuations.

Step 1. Create an example cloud instance

This requires no interaction, will use the default Solr configuration with two replicas, and two shards under the 'example' cloud node.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin/solr start -e cloud --no-prompt

Step 2. Create the mechanical pencils collection

This will create and configure the mechanical pencil collection based on the schema so that the data can be indexed.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin/solr create -c mechanical-pencils -d ↩
PANL_INSTALL_DIRECTORY/sample/solr/mechanical-pencils/ --shards 2 -rf 2

Step 3. Index the mechanical pencils data

This will index the included sample mechanical pencil data into the Solr instance in the mechanical-pencils collection.

Command(s)

cd SOLR_INSTALL_DIRECTORY

bin/solr post -c mechanical-pencils ↩
PANL_INSTALL_DIRECTORY/sample/data/mechanical-pencils.json

Step 4. Start the Panl Server

This will start the server and be ready to accept requests.

Command(s)

cd PANL_INSTALL_DIRECTORY

bin/panl server -properties ↩
PANL_INSTALL_DIRECTORY/sample/panl/mechanical-properties/
panl.properties

Step 5. Browse the in-built Panl Results Viewer web app

You may either click on the [Explain] link on the Panl Results Viewer, or open the link

http://localhost:8181/panl-results-viewer/

in your favourite browser, choose a collection/FieldSet and search, facet, sort, paginate and view the results

Need help understanding what the Panl server is doing?

Open the link

http://localhost:8181/panl-results-explainer/

in your favourite browser, choose a collection and fieldset, paste the canonical URL path from the results viewer and an explanation of the parsing and decoding and the configuration will be presented.

Something Went Wrong?

Work your way through the next section, or have a look at the When Something Goes Wrong section.

Next Steps

  1. For indexing additional data, see the Additional Data chapter, for a deeper understanding of how to set up a new collection and index data.  
  2. Read the Solr Fundamentals and Panl Fundamentals sections for key information on the servers.
  3. Work through setting up a search page from scratch with The Bookstore Walkthrough chapter.
  4. Test out DATE RANGE facets, see the section on indexing the Simple Date dataset.
  5. Understand how to programmatically index a collection with the Filesystem Indexing And Searching Walkthrough chapter.

~ ~ ~ * ~ ~ ~