Getting Started With Panl
A rather pleasing companion to the Apache® Solr® Faceted Search Engine
_____________
Author: Synapticloop - Version 1.1.1
This book will get you up and running with a fully featured, SEO friendly, keyword searchable, faceted search engine with an in-built, example search page to test it all out.
(Note: The most up-to-date version of this book can always be found here: https://github.com/synapticloop/panl/tree/main/src/book)
WHY?
Because...
/Caran+d'Ache/true/Black/bDW/
looks so much nicer than...
q=*:*&facet.mincount=1&rows=10&facet.field=lead_size_indicator&facet.fie
ld=grip_material&facet.field=colours&facet.field=nib_shape&facet.field=d
iameter&facet.field=cap_shape&facet.field=brand&facet.field=mechanism_ty
pe&facet.field=length&facet.field=hardness_indicator&facet.field=grip_ty
pe&facet.field=cap_material&facet.field=lead_grade_indicator&facet.field
=tubing_material&facet.field=in_built_sharpener&facet.field=disassemble&
facet.field=category&facet.field=body_shape&facet.field=clip_material&fa
cet.field=mechanism_material&facet.field=lead_length&facet.field=body_ma
terial&facet.field=in_built_eraser&facet.field=grip_shape&facet.field=re
lative_weight&facet.field=name&facet.field=nib_material&facet.field=weig
ht&facet.field=variants&facet=true&fq=brand:"Caran+d'Ache"&fq=disassembl
e:"true"&fq=colours:"Black"&q.op=AND
TL;DR
If you are looking to get the quickest start on understanding how a Panl server is configured and up and running, then...
- Start with the Quick Start - The 5 Steps section to get the Solr and Panl servers up and running.
- Look at the Panl Results Viewer
http://localhost:8181/panl-results-viewer/mechanical-pencils/default/ - Work through the A Walkthrough Example - The Book Store section to gain a deeper understanding of the configuration options.
- Use your existing dataset with Integrating An Existing Solr Schema
- Need help? See the Panl Configuration section
QUICK TIP
If you need to restart the example Solr server installation - try these commands:
Windows:
Command(s) |
cd SOLR_INSTALL_DIRECTORY
bin\solr start -cloud -p 8983 -s "example\cloud\node1\solr" bin\solr start -cloud -p 7574 -s "example\cloud\node2\solr" -z localhost:9983 |
*NIX:
Command(s) |
cd SOLR_INSTALL_DIRECTORY
bin/solr start -cloud -p 8983 -s "example/cloud/node1/solr" bin/solr start -cloud -p 7574 -s "example/cloud/node2/solr" -z localhost:9983 |
|
Tip: Documentation for this book can also be read online, see https://synapticloop.github.io/panl/, or to download the latest copy of this book, see https://github.com/synapticloop/panl/releases/. |
Copyright Notice
The data used in this book is based on 2mm mechanical pencil data hand curated by the author. The data and associated Solr search results utilised in this book references manufacturers of writing instruments, specifically 2mm mechanical pencils. The manufacturer's name, the name of the pencil (and/or model number) is a trademark and/or is copyright of the manufacturer.
Additional datasets may have information that is copyright to the respective owners.
Whilst the project is released under the very liberal MIT licence, the sample mechanical data remains under the copyright of Synapticloop, and may not be used for commercial purposes.
~ ~ ~ * ~ ~ ~
TABLE OF CONTENTS
Welcome To Synapticloop Panl 13
Nomenclature Used Throughout This Book 15
How Many Facets Does Panl Support? 21
In-Built Web Apps (Viewer / Explainer / Single Search Page) 22
What is a LPSE (pronounced 'lapse') code? 32
The three types of LPSE codes 33
Is Synapticloop Panl For Me? 34
The Panl Directory Structure 36
Solr-Panl-8-x.x.x & Solr-Panl-7-x.x.x 39
Solr-Panl-6-x.x.x and earlier version 40
A Note On Running The Commands 42
Creating and Starting a Solr Cloud Instance 48
Restarting the Solr Panl tutorial process 55
Creating and Indexing the Data 58
panl.properties File Additions 59
Mechanical Pencils OR Facet 59
Creating and Indexing the Data 60
panl.properties File Additions 60
A Walkthrough Example - The Book Store 62
1. Understanding the Dataset 64
2. Configure the Solr Index 66
3. Configure the Panl Server 71
The Default panl.properties file 72
The Default Search Page Configuration 73
4. Determine the Web Pages to Render 90
The Iterative Implementation Process 91
Unsupported/Partially Supported Solr Field Types 93
A Brief Introduction To Solr 102
Determining the Appropriate FieldType and Attributes 107
The Solr Configuration File 111
The <panl_collection_url>.panl.properties file 115
The panl.properties Configuration File 117
Configuring The SolrJ Connector 118
Setting The Solr Server URL(s) 119
Enabling The Panl Results Testing URLs 120
The Panl Results Explainer 122
The Panl Single Page Search 122
Setting HTTP Status Message Verbosity 123
Binding Solr collections to Panl URL paths 124
The <panl_collection_url>.panl.properties Configuration File 125
Parameter and Operand Definitions 125
panl.param.passthrough.canonical 130
panl.include.single.facets 132
panl.include.same.number.facets 132
solr.default.query.operand 134
Properties Available for Facets 135
Properties Available for Facets 137
Decoding the URL Without a Prefix or Suffix 144
Defining a Prefix and Suffix 145
Decoding the URL With a Prefix or Suffix 145
The Difference Between Multi-valued Facets and OR Facets 146
Visualising the Properties 156
Decoding the URL - Range facet with an infix 158
Decoding the URL - Range facet without an infix 158
Putting It All Together (Technically) 169
Generating SEO Friendly URLs 170
Panl LPSE URL Paths Explained 172
Explaining A More Complex Example 181
Search Integration And The Panl Response Object 183
Overall Integration and Implementation 187
The "active.facet" JSON Array (Regular facet object) 188
Integration and Implementation 189
The "active.facet" JSON Array (BOOLEAN facet object) 189
Integration and Implementation 190
The "active.facet" JSON Array (DATE Range facet object) 191
Integration and Implementation 192
The "active.facet" JSON Array (OR facet object) 193
Integration and Implementation 194
The "active.facet" JSON Array (RANGE facet object) 194
Integration and Implementation 195
The "active.numrows" JSON Object 196
Integration and Implementation 196
The "active.page" JSON Object 196
Integration and Implementation 197
The "active.query" JSON Object 197
Integration and Implementation 198
The "active.query" JSON Object 198
Integration and Implementation 199
The "active.sort" JSON Array 199
Integration and Implementation 199
The "available" JSON Object 200
The "available.date_range_facets" JSON Array 201
Integration and Implementation 202
The "available.facets" JSON Array 203
Integration and Implementation 204
The "available.range_facets" JSON Object 204
Implementation and Integration 205
Implementation and Integration 213
Single Search Page Integration And The Panl Response Object 218
The "lpse_lookup" JSON Object 220
The "lpse_order" JSON Array 221
Generating the LPSE URL path 221
Integrating An Existing Solr Schema 222
Running the Command Line Utility 222
Editing the Generated Files 226
Manually Creating the Configuration Files 226
Properties Quick Reference 228
Property References Format Explained 228
panl.bool.<lpse_code>.false 229
panl.bool.<lpse_code>.true 230
panl.collection.<solr_collection_name> 231
panl.date.<lpse_code>.days 232
panl.date.<lpse_code>.hours 233
panl.date.<lpse_code>.months 234
panl.date.<lpse_code>.next 235
panl.date.<lpse_code>.previous 236
panl.date.<lpse_code>.years 238
panl.facetsort.<lpse_code> 240
panl.include.same.number.facets 242
panl.include.single.facets 243
panl.multivalue.<lpse_code> 245
panl.param.passthrough.canonical 251
panl.range.facet.<lpse_code> 253
panl.range.infix.<lpse_code> 254
panl.range.max.<lpse_code> 255
panl.range.max.value.<lpse_code> 255
panl.range.max.wildcard.<lpse_code> 256
panl.range.min.<lpse_code> 257
panl.range.min.value.<lpse_code> 257
panl.range.min.wildcard.<lpse_code> 258
panl.range.prefix.<lpse_code> 259
panl.range.suffix.<lpse_code> 260
panl.range.suppress.<lpse_code> 260
panl.results.fields.<field_set> 261
panl.results.fields.default 261
solr.default.query.operand 266
Collections And FieldSet URL Paths (CaFUPs) 278
In-Built Panl Results Testing URLs 279
500 - Internal Server Error 282
Additional Functionality in the Pipeline 287
The Sample panl.properties Files 299
The Sample <panl_collection_url>.panl.properties Files 300
Solr Version 8 & 7 Integration Notes 301
Setting up a Solr 7 or 8 server 302
Additional Solr Version 7 Integration Notes 307