HTML endpoint
Introduction
search.html
is the main entry point of Funnelback’s Modern UI search interface.
It has responsibility for:
-
displaying search templates
-
validating and executing queries
-
the formatting and display of search results
Changing the look, feel and general presentation of search results can be achieved through modifying the search template files, and by modifying the parameters that search.html
receives (usually from HTML forms).
Processing steps
A simplified set of steps performed by search.html
is:
-
HTTP request for
search?collection=shakespeare
(Optionally&query=juliet
). -
Run the query if there is one and gather result data from the query processor (PADRE
-
Populate a data model containing:
-
The input parameters for the query
-
The response from the query processor, if any
-
Any error raised
-
-
Return HTML by merging the data model with the rendered search template.
Advanced query string parameters
search.html
has its behaviour and the results it presents controlled by the parameters that are given to it by means of the requested URI. Many of these parameters are really query processor options, and hence are documented in the section on query processor options.
The other parameters specific to search.html
that are available and their meanings are listed here.
These parameters also apply to search.xml and search.json.
Option | Values | Explanation |
---|---|---|
|
collection ID |
This is the most important parameter as it selects the collection to be searched over. Many aspects of Funnelback’s behaviour will be controlled by the collection-specific configuration files. E.g selecting |
|
simple, advanced, other |
The name of the form file to use as the basis for the search interface. E.g. selecting |
|
valid query |
The query terms to be processed. See the page on simple searches for details on what makes a valid query. |
|
Additional query expression |
Additional query terms that will be appended to the value of |
|
collection ID |
This option specifies which components of a meta collection to search at query time. Use separate parameters for multiple collections e.g. |
|
comma separated list of gscope numbers |
This option is similar to the |
|
valid query term |
|
|
valid query term |
system generated metadata special CGI parameters. See: system query parameters section below. |
|
profile name |
This option is identical to the 'profile' option specified in the query processor options. |
|
valid query term |
Adds an and term to the query to be processed. E.g. selecting |
|
valid query term |
Adds a compulsory and term to the query to be processed. E.g. selecting |
|
valid query term |
Adds a truncated term to the query to be processed. E.g. selecting |
|
valid query term |
Adds a phrased term to the query to be processed. E.g. selecting |
|
valid query term |
Adds a proximity set of terms to the query to be processed. E.g. selecting |
|
valid query term |
Adds an or’ed set of terms to the query to be processed. E.g. selecting |
|
valid query term |
Adds an or’ed set of terms to the query to be processed, where the or’ed terms are required to be present in matching documents. E.g. selecting |
|
valid query term |
Adds a compulsory or’ed term to the query to be processed. E.g. selecting |
|
valid query term |
Adds a not term to the query to be processed. E.g. selecting |
|
scope string |
Similar to the |
The query processor options page lists CGI parameters specific to the query processing system, including sorting, stemming and many more.
System query parameters
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 spelling suggestions 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.
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 (Note: replace X
with the relevant metadata class name):
Standard query parameter | System query parameter | Example (CGI parameter) |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 user interface hook script but must be done so by adding to inputParameters
.
transaction.question.inputParameters.replaceValues("s", ["VALUE"])