System queries

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 and query blending. (Note: stemming is applied to the system query)

  • 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

System query parameters should be used for any system generated queries such as cases where Funnelback’s search index is used like a database. This keeps that analytics clean (so it only reports on the queries that the user types) and also avoids synonym/query blending transformations that don’t make sense for a system query.

System query parameters

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

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

Standard query parameter System query parameter Example (CGI parameter)

query

s

s=%22julius%20caesar%22%20%2Bcity%3Arome

meta_ClassName

smeta_ClassName

smeta_city=paris

meta_ClassName_and

smeta_ClassName_and

smeta_city_and=london

meta_ClassName_or

smeta_ClassName_or

smeta_city_or=stockholm

meta_ClassName_phrase

smeta_ClassName_phrase

smeta_city_phase=washington%20dc

meta_ClassName_not

smeta_ClassName_not

smeta_city_not=berlin

meta_ClassName_sand

smeta_ClassName_sand

smeta_city_sand=sydney

meta_ClassName_orsand

smeta_ClassName_orsand

smeta_city_orsand=beijing

Setting the system query parameter using a hook script

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

transaction.question.rawInputParameters["s"] = ["VALUE"]

© 2015- Squiz Pty Ltd