Injecting a system query (s) parameter into the data model

Managed by | Updated .

Background

The system query parameter is search query input field that can be used to supply search terms and constraints to a search query that are treated as hidden parameters.

The system query accepts a query specified using Funnelback's query language operators (the same as in a standard query field) but with the following differences:

  • The system query field is not modified by transformation features such as synonyms, query blending, stemming
  • Values within the system query field are not displayed in the cleaned query (so don't display on the search interface)
  • Values within the system query field are not displayed in the search analytics

The system query parameter is accessed via the s and smeta_X_* parameters.

The following table illustrates standard CGI parameters and their system query equivalents

Standard query parameter System query parameterExample (CGI parameter)
query s s=%22julius%20caesar%22%20%2Bcity%3Arome
meta_ClassName smeta_ClassName meta_city=paris
meta_ClassName_and smeta_ClassName_and meta_city_and=london
meta_ClassName_or smeta_ClassName_or meta_city_or=stockholm
meta_ClassName_phrase smeta_ClassName_phrase meta_city_phase=washington%20dc
meta_ClassName_not smeta_ClassName_not meta_city_not=berlin
meta_ClassName_sand smeta_ClassName_sand meta_city_sand=sydney
meta_ClassName_orsand smeta_ClassName_orsand meta_city_orsand=beijing

Process

The system query parameter can be supplied as a CGI parameters (&s=, &smeta_X=) or can be injected into the data model from a hook script but must be done so by adding to rawInputParameters

transaction.question.rawInputParameters["s"] = ["VALUE"]
Was this artcle helpful?

Comments