Stored Parameters for Facets
- An existing facets configuration can be converted into the required format via a once-off custom script (e.g. written by Lucidworks solution engineers or by a customer’s technical team).
- Note that if a caller wants particular behavior e.g. specifying that all results should be from a given category, then it is up to them to specify that in their original request (e.g. using a filter query “fq” setting).
- A new Stored Parameter Query Stage can then be used in a query pipeline to add the required parameters for a given key (e.g. a category ID).
Stored Parameters Example
The following example shows how faceting can be carried out over a hierarchy of categories and subcategories where there are many known subcategory-specific attributes to query on. The example data is taken from the Best Buy product catalog data. In this list of stored parameter objects, the set of fields used are:- “id” : record ID (or “key” in the sense of a “Key-Value” store) of the category to facet on.
- “label_s” : human-readable label for this record, i.e., the category name
- “in_ids_ss” : parent categories, if an intermediate category in a category hierarchy. Intended use is in traversing a directed graph of categories.
- “out_ids_ss” : child categories, if an intermediate category in a category hierarchy. Intended use is in traversing a directed graph of categories.
- “parameters_ss” : list of arbitrary Solr parameters that can be used to construct a query that is relevant for the entity described by this record. In this example, it is the list of facet parameters to use for this specific category.
Direct Access and Navigation
A caller can query theCOLLECTION_NAME_stored_parameters
system collection directly.
For example, a Solr request to get the human-readable label stored in field “label_s” for a specific category ID is: