Query pipeline stage configuration specifications
let
, const
, or template strings, Fusion does not enable ES6 by default, so ES6 support is not guaranteed.
What a JavaScript program can do depends on the container in which it runs.
For a JavaScript Query stage, the container is a Managed Fusion query pipeline.
Global pipeline variables
request
variable contains Solr query information and is referred to as a regular request. A regular query request does not include Search DSL (domain specific language) parameters.The request
variable is also used when the query contains parameters for a Search DSL (domain specific language) request.
response
variable contains Solr response information, and is used to return information from a regular request. Because a regular request does not include Search DSL parameters, the response will not return DSL results.The response
variable is also used to return information from a Search DSL request.
A map that stores miscellaneous data created by each stage of the pipeline.
ctx
variable instead of the deprecated _context
global variable. ctx
variable is used to: The SolrCluster server used for lookups by collection name which returns a Solr server instance for that collection, e.g.
var productsSolr = solrServerFactory.getSolrServer(“products”);
logger
productsToBury
parameter that allows you to specify a list of product IDs to “bury” or demote in search results.
AbstractResponse
class to manipulate response documents, which works for both XML and JSON responses for versatility.
bq
parameter to apply boosts, which allows for precise ranking control in search results.
The boost values are linearly distributed between a maximum and minimum value, allowing for a smooth decrease in boost as the list progresses.
This is useful for merchandising control, promotional campaigns, or A/B testing different product arrangements.
elevateIds
parameter format required by Solr’s QEC, allowing specific documents to be promoted to the top of search results.
This is useful for merchandising control, promotional campaigns, or editorial control over search result ranking.
\t
for the tab character. When entering configuration values in the API, use escaped characters, such as \\t
for the tab character.