panl

Turning a jumble of URL parameters into an SEO friendly URL.

A rather pleasing companion to the Apache® Solr® Faceted Search Engine.

Panl is an application that sits between your web application and Solr search server instance(s) that seamlessly converts human-readable, SEO friendly URLs into complex Solr search queries.

It abstracts away the complexities of the Solr search parameters, however some examples of the conversions are given should you wish to delve deeper into the inner-workings of the Panl server.

Why?

Because /Caran+d'Ache/true/Black/bDW/ looks nicer than

q=*:*&facet.mincount=1&rows=10&facet.field=lead_size_indicator&
facet.field=grip_material&facet.field=colours&facet.field=nib_shape&
facet.field=diameter&facet.field=cap_shape&facet.field=brand&
facet.field=mechanism_type&facet.field=length&facet.field=hardness_indicator
&facet.field=grip_type&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&facet.field=mechanism_material&facet.field=lead_length
&facet.field=body_material&facet.field=in_built_eraser&facet.field=grip_shape
&facet.field=relative_weight&facet.field=name&facet.field=nib_material
&facet.field=weight&facet.field=variants&facet=true&fq=brand:"Caran+d'Ache"
&fq=disassemble:"true"&fq=colours:"Black"&q.op=AND

Additional Panl Niceties

  1. PREFIXES and SUFFIXES - Panl can be configured to add prefixes and suffixes to the URI path to increase readability, for example,
    The example LPSE URI path of /Caran+d'Ache/true/Black/bDW/ could also have the brand Solr field prefixed with ‘Manufactured By ’ and suffixed by ‘ Company’ to produce the URI path
    /Manufactured+By+The+Caran+d'Ache+Company/true/Black/bDW/
  2. BOOLEAN field translations, for any Solr field that is defined as a solr.BoolField, then an additional translation can be performed. ‘True’ and ‘false’ values can be replaced with arbitrary text, which will be transparently converted between Panl and Solr.
    For the LPSE URI path of /Caran+d'Ache/true/Black/bDW/ the true value (which is defined as whether the mechanical pencil can be disassembled could be changed to ‘Able to be disassembled’ for true values, and ‘Cannot be disassembled’ for false values. The above URI path would then become
    /Caran+d'Ache/Able+to+be+disassembled/Black/bDW/
  3. FIELD VALUE validation - By default, Solr will error when an invalid value is passed through - for example, if Solr is expecting a numeric value and it could not parse the passed in value. Panl protects against this by attempting to parse the value as best it can, and silently dropping the parameter if it cannot be sensibly parsed. This is only done for numeric types.
  4. SORTING options - sort by any of the Solr fields, either ascending, or descending and with multiple sub-sorting available - e.g. sorting by a brand name, than the model number
  5. PAGINATION - easy to generate pagination URI paths giving you control of how you would like to implement it.
  6. STATIC SITE GENERATION - With the exception of a query parameter, all available links for every conceivable URI path can be statically generated ahead of time, with canonical URLs.

Need more information

We love code... We want people to use it... We explain it well...

All so you can get up and running in no time.

Read Offline

Prefer a PDF all on one to print or take with you?

Download the book...

Read online

Prefer an HTML experience? See the headings below for quick links to getting started.

Start at the beginning...

Peruse the collection

See the statically generated site powered by the Panl server.

Mechanical pencils...

Documentation from the book

Read all about it...