Panl LPSE URL Paths Explained

How to decode the URL parameters for the LPSE encoded URL.  The nomenclature for the URL path is detailed below

The LPSE URL Path

/

<panl_collection_url>

/

<field_set>

/

hello+world

/

q

/

The Panl collection URL value

The Field Set

The value path part

The LPSE path part

Panl CaFUPs URL Path

For the information in this chapter, only the 'LPSE URL Path' will be discussed.

Each of the LPSE URL Path components will have the following information:

Property

The property that configures this in the <panl_collection_url>.panl.properties file.

Value Path Part

Whether the value of this parameter or facet appears in the value path part, possible values are:

  • Always - will always appear in the URL value path part
  • Never - will never appear in the URL valuepath part
  • Conditional - Depending on configuration options or values, may appear in the URL value path part

LPSE Path Part

Whether the value of this parameter or facet appears in the LPSE path part, possible values are:

  • Always - will always appear in the LPSE path part
  • Never - will never appear in the LPSE path part
  • Conditional - Depending on configuration options or values, may appear in the LPSE path part

Canonical Value Path Part

Whether the value of this parameter or facet appears in the canonical value path, possible values are:

  • Always - will always appear in the canonical value path part
  • Never - will never appear in the canonical value path part
  • Conditional - Depending on configuration options or values, may appear in the canonical value path part

Canonical LPSE Path part

Whether the value of this parameter or facet appears in the canonical URL value path, possible values are:

  • Always - will always appear in the canonical LPSE path part
  • Never - will never appear in the canonical LPSE path part
  • Conditional - Depending on configuration options or values, may appear in the canonical LPSE path part

Value Format

The format for the complete LPSE URL path.

Default LPSE Code

The default LPSE code used in this book, or from the Panl generator utility.

Notes

Any additional notes applicable to the parameter or facet LPSE code.

See also

Other properties or headings that may influence the configuration of a parameter or facet

Parameter Query

The user entered search term (either a word or phrase) to search the Solr collections for a match.

Property

panl.param.query

Value Path Part

Always

LPSE Path Part

Always

Canonical Value Path Part

Always

Canonical LPSE Path part

Always

Value Format

/<string>/<lpse_code>/

Default LPSE Code

q

Notes

See also


Parameter Query Operand

The parameter that controls whether to use an OR, or an AND query on the search term - this maps to the q.op query parameter for the Solr search server.

Property

panl.param.operand

Value Path Part

Never

LPSE Path Part

Sometimes - this will only appear in the LPSE URL path.

Canonical Value Path Part

Never

Canonical LPSE Path part

Sometimes - this will only appear in the LPSE URL path if it does not match the default query operand.

Value Format

/<lpse_code>(+/-)/

Default LPSE Code

o

Notes

  1. The default query operand can be set in the <panl_collection_url>.panl.collection.properties file.

See also


This parameter will rarely be used as it has a default property
solr.default.query.operand which controls all of the collected CaFUPS.  The default generated properties have a query operand of - (OR) which will give the greatest number of results.  If this is set to + (AND) then the search term must match in all of the fields configured in the solrconfig.xml file.

Parameter Number of Rows

The number of rows of results to return from the Solr search server.

Property

panl.param.numrows

Value Path Part

Sometimes - this will only appear in the LPSE URL path if it does not match the default number of rows property.

LPSE Path Part

Sometimes - this will only appear in the LPSE URL Path part if it does not match the default number of rows property.

Canonical Value Path Part

Always

Canonical LPSE Path part

Always

Value Format

/<prefix><integer><suffix>/<lpse_code>/

Default LPSE Code

n

Notes

  1. If the value of this parameter is not set then the default is set to 10.

See also


The default
solr.numrows.default when generated is 10 results per page.  

This parameter may have a prefix and or suffix configured, in the example mechanical-pencils.panl.properties file it is configured with the following properties

01

02

panl.param.numrows.prefix=

panl.param.numrows.suffix=-per-page


The LPSE URL path would be

/3-per-page/n/

If the properties were configured

01

02

panl.param.numrows.prefix=show-me

panl.param.numrows.suffix=-per-query


The LPSE URL path would be

/show-me-3-per-query/n/

Parameter Page Number

The parameter which sets the page number of the results

Property

panl.param.page

Value Path Part

Sometimes - this will only appear in the LPSE URL Path part if it is not the first page.

LPSE Path Part

Sometimes - this will only appear in the LPSE URL Path part if it is not the first page.

Canonical Value Path Part

Always

Canonical LPSE Path part

Always

Value Format

/<prefix><integer><suffix>/<lpse_code>/

Default LPSE Code

p

Notes

For the first page, the results will be the same if this value is included or not. E.g. / is equivalent to /page-1/p/

See also


This parameter may have a prefix and or suffix configured, in the example mechanical-pencils.panl.properties file it is configured with the following properties

01

02

panl.param.page.prefix=page-

panl.param.page.suffix=


The LPSE URL path would be

/page-1/p/

If the properties were configured

01

02

panl.param.numrows.prefix=i-am-on-page-

panl.param.numrows.suffix=-of-the-results


The LPSE URL path would be

/i-am-on-page-4-of-the-results/p/

Parameter Pass Through

A parameter which is ignored by Panl and never sent through to the Solr query.  This is useful for generating SEO friendly URls.

Property

panl.param.passthrough

Value Path Part

Always

LPSE Path Part

Always

Canonical Value Path Part

Sometimes - By default this will NOT appear in the LPSE path part unless the panl.param.passthrough.canonical property is set to true.

Canonical LPSE Path part

Sometimes  - By default this will NOT appear in the LPSE path part unless the panl.param.passthrough.canonical property is set to true.

Value Format

/<string>/<lpse_code>/

Default LPSE Code

z

Notes

  1. This value will never be passed through to the Solr query

See also

panl.param.passthrough.canonical

With the default for the property panl.param.passthrough.canonical, i.e.

01

panl.param.passthrough.canonical=false


The LPSE URL path would be

/some+sort+of+arbitrary+string/z/

And the canonical URL path would be

/page-1/10-per-page/pn/

Note: in the above URL path, the page number and number of results per page always appear, but the passthrough parameter does not.

However, with the property set to true:

01

panl.param.passthrough.canonical=true


The LPSE URL path would be

/some+sort+of+arbitrary+string/z/

And the canonical URL path would be

/some+sort+of+arbitrary+string/page-1/10-per-page/zpn/

Parameter Sort Order

A parameter which defines how the results will be sorted.

Property

panl.param.sort

Value Path Part

Never

LPSE Path Part

Sometimes - this will only appear if it does not match the default sort order (relevance descending).

Canonical Value Path Part

Never

Canonical LPSE Path part

Sometimes - this will only appear if it does not match the default sort order (relevance descending).

Value Format

/<lpse_code><sort_field_lpse_code>(+/-)/

Default LPSE Code

o

Notes

If the value of this parameter

See also


By default the Solr results return in search relevance order descending (there is no ascending order for search relevance), and Panl respects that. The default sorting LPSE URL path is simply

/

And the canonical LPSE URL path for the sort order is the same

/

However, if there is a sort order set (or many sort orders set), then the LPSE URL path and the canonical LPSE URL paths will be generated.

Ordering by a Solr field.

Search ordering for fields is controlled by the panl.order.fields property in the <panl_collection_url>.panl.properties file.

/sb+/ order the search results by brand in ascending order

/sb-/ order the search results by brand in descending order

If no Panl LPSE field definition is included, then it defaults to the relevance ordering. For any of the orderings, you have the option to replace the ordering with a new ordering, or add to the ordering with an additional ordering.

/sb-sN+/ order the search results by brand in descending order, then by name ascending.

Facets

Facets are the primary way of filtering results and are straightforward to decode.

Property

panl.facet.<lpse_code>

Value Path Part

Always

LPSE Path Part

Always

Canonical Value Path Part

Always

Canonical LPSE Path part

Always

Value Format

/<prefix><string><suffix>/<lpse_code>/, or

/<range_prefix><string><range_suffix>/<lpse_code>/, or

/<min_value_replacement><string><max_value_replacement>/<lpse_code>/

Default LPSE Code

N/A

Notes

See also


For any facet, the URL path would be

/the+facet+value+with+prefix+or+suffix/?/

Where the ? is the LPSE code, these are always passed through to the canonical URL path, as in

/the+facet+value+with+prefix+or+suffix/?/

For any URL path, the prefixes, suffixes and, in the case of a RANGE facet, the infix will be included in the URL.  Multiple LPSE codes can be present in any order without affecting the returned results.  For example, the URL path generated by Panl for this URL:

http://localhost:8181/panl-results-viewer/mechanical-pencils/firstfive/Red/Purple/Entry+Level/WWC/

Is

/Red/Purple/Entry+Level/WWC/,

with the canonical URL

/Purple/Red/Entry+Level/page-1/10-per-page/WWCpn/

Note: The Panl generated URL path is different from the canonical URL path, the canonical URL that is generated

  • Always includes the page number and the number of results per page.
  • Facets are placed in LPSE order
  • Facets are ordered alphabetically

This ensures that there is only ever a single URL path for any set of results.  If you were to move the LPSE codes and values around - e.g. putting the category value first (LPSE code 'C' as:

http://localhost:8181/panl-results-viewer/mechanical-pencils/firstfive/Entry+Level/Red/Purple/CWW/

The results are the same, and the canonical URL remains as

/Purple/Red/Entry+Level/page-1/10-per-page/WWCpn/

Explaining A More Complex Example

For the canonical URL path:

/Purple/Red/Entry+Level/from+light+to+16+grams/page-1/5-per-page/WWCw-wsb-pn/



Image: Mapping of LPSE codes to LPSE values

Decoding the above:

  • 'Purple' is the Colour facet (LPSE code 'W')
  • 'Red' is another Colour facet (LPSE code 'W')
  • 'Entry Level' is the Category of pencil (LPSE code 'C')
  • 'Weight' is from the minimum value to to 16 grams (inclusive)  (LPSE code 'w-w')
  • Sort order is by brand descending  (LPSE code 'sb-' - note that there is no LPSE value path part)
  • Page 1  (LPSE code 'p')
  • 5 results per page  (LPSE code 'n')

Or in more human readable terms:

Select all entry level pencils that come in purple or red weighing anywhere from light to 16 grams.  Sort the results by brand, showing the first page with up to 5 results.

As you get more familiar with Panl visually decoding the URL path becomes easier, although once Panl is set up and running, the need for this diminishes.

Remember: that you can always use the Panl Results Explainer for additional information, for the above URL path - the results that the explainer gives are as follows:

Request Token Explainer

PANL [ VALID ] <facet> LPSE code 'W' (solr field 'colours') with parsed value 'Purple', incoming value 'Purple'.

PANL [ VALID ] <facet> LPSE code 'W' (solr field 'colours') with parsed value 'Red', incoming value 'Red'.

PANL [ VALID ] <facet> LPSE code 'C' (solr field 'category') with parsed value 'Entry Level', incoming value 'Entry+Level'.

PANL [ VALID ] <facet (RANGE)> LPSE code 'w' (solr field 'weight') incoming value 'from+light+to+16+grams', parsed value 'RANGE(10:16) with infix'.

PANL [ VALID ] <sort> LPSE code 's' sort code 'b' (solr field 'brand'), sorted DESCending

PANL [ VALID ] <page_number> LPSE code 'p' using parsed value of '1'.

PANL [ VALID ] <num_rows> LPSE code 'n' original URL path value '5-per-page' using parsed value of '5'.

~ ~ ~ * ~ ~ ~