CGI parameters

CGI parameters

Search CGI parameters

Search form code is provided that you can copy and paste into the HTML of your site ( Design > Auto-Complete > Form Source).

See Copying the HTML code of the search form into the….

You can also set the parameters that are listed either in the search form itself, or from a script. In addition to the parameters that are listed below you can also use the backend search parameters to control search.

See Backend search CGI parameters.

Search requests consist of a base URL. The base URL indicates what account the customer is searching, and a set of CGI parameters (key-value pairs) that indicate how to return the desired search results for the associated account.

The base URL is associated with a specific account and a staged or live environment. You can request multiple aliases for the base URL from your account manager. For example, a company called Megacorp may have two base URLs associated with their account: https://search.megacorp.com and https://stage.megacorp.com. The former URL searches their live index and the latter URL searches their staged index.

Three formats of CGI Parameters are supported. By default your account is configured to separate CGI Parameters with a semi-colon as in the following example:

https://search.megacorp.com?q=shoes;page=2

If you prefer, you can have your account manager configure your account to use ampersands to separate the CGI parameters as in the following example:

https://search.megacorp.com?q=shoes&page=2

A third format, called the SEO format, is also supported where a forward slash / is used in place of the separator and equal sign as in the following example:

https://search.megacorp.com/q/shoes/page/2

Any time the SEO format is used to send a request, all output links are returned in the same format.

Guided Search parameter Example Description
q q=string Specifies the query string for the search. This parameter maps to the sp_q backend search parameter. See Backend search CGI parameters.
q# q#=string Faceting (searching within a given field) is done by way of numbered q and x parameters. The q parameter defines the term you are searching for in the facet as denoted by the corresponding numbered x parameter.
For example, if you have two facets that are named size and color, you can have something like q1=small;x1=size;q2=red;x2=color. This parameter maps to the sp_q_exact_# backend search parameters.
See Backend search CGI parameters.
x# q#=string Faceting (searching within a given field) is done by way of numbered q and x parameters. The q parameter defines the term you are searching for in the facet as denoted by the corresponding numbered x parameter.
For example, if you have two facets that are named size and color, you can have something like q1=small;x1=size;q2=red;x2=color. This parameter maps to the sp_x_# backend search parameters.
See Backend search CGI parameters.
collection collection=string Specifies the collection to use for the search. This parameter maps to the sp_k backend search parameter. See Backend search CGI parameters.
count count=number Specifies the total count of results that are shown. The default is defined in Settings > Searching > Searches . . This parameter maps to the sp_c backend search parameter. See Backend search CGI parameters.
page page=number Specifies the page of results that are returned.
rank rank=field Specifies the rank field to use for static ranking. The field must be a field of type Rank with relevance greater than 0. This parameter maps to the sp_sr backend parameter. See Backend search CGI parameters.
sort sort=number Specifies the sort order.
“0” is the default and sorts by relevance score; “1” sorts by date; “-1” does not sort. Users can specify a field name for the value of the sp_s parameter. For example, sp_s=title sorts results according to the values that are contained in the title field. When a field name is used for the value of an sp_s parameter, results are sorted by that field and then sub-sorted by relevance. To enable this feature, click Settings > Metadata > Definitions . On the Definitions page, click Add New Field or click Edit for a particular field name. In the Sorting drop-down list, select either Ascending or Descending . This parameter maps to the sp_s backend search parameter.
See [Backend search CGI parameters].(/docs/search-promote/using/appendices/c-cgiparameters.html?lang=en#reference_582E85C3886740C98FE88CA9DF7918E8).

Backend search CGI parameters

Typically customers interact with a presentation layer called Guided Search. However, it is theoretically possible to skip the Guided Search layer and interact with the backend core search directly using the CGI parameters that are described on this page.

You can select backend search CGI parameters from the following table:

Single query support

Multiple query support

Examples

Description

1

sp_a

sp_a= string

Specifies the account number string. This parameter is required, and must be a valid account number string. You can find your account number string under Settings > Account Options > Account Settings .

2

sp_advanced

sp_advanced= 0 or 1

If sp_advanced=1 is submitted with a query, then all code between the <search-if-advanced> tag and the </search-if-advanced> tag in the search template is used for the search form. All code between the <search-if-not-advanced> tag and the </search-if-not-advanced> tag is be ignored. If sp_advanced=0 (or any other value) is submitted, then the <search-if-advanced> template block is ignored and the <search-if-not-advanced> template block is used.

3

sp_c

sp_c= number

Specifies the total count of results to show. The default is 10.

4

sp_context_field

sp_context_field= field

Collects contextual information for the given field. Collected information is output in the search results by way of the <search-context> template tag. The default value is body .

5

sp_d

sp_d= type

Specifies the type of date range searching to perform. Possible values for type are any, which means do not perform date range searching, custom, which indicates that the value of sp_date_range should be used to determine the dates to search, and specific, which indicates that the values in sp_start_day , sp_start_month , sp_start_year , sp_end_day , sp_end_month , and sp_end_year is used to determine the date range to search. sp_d is only required if your search form contains the option to search either by a custom range (by way of sp_date_range ), or by a specific start and end date range.

6

sp_d_#

sp_d_#= type

Specifies the type of date range searching to perform for the corresponding sp_q_# query. The "#" is replaced with a number between 1 and 16 (for example, sp_d_8 , applies to the numbered query sp_q_8 ).

You can set type to any, which means do not perform date range searching, custom, which indicates that the value of sp_date_range_# is used to determine the dates to search, and specific, which indicates that the values in sp_q_min_day_# , sp_q_min_month_# , sp_q_min_year_# , sp_q_max_day_# , sp_q_max_month_# , and sp_q_max_year_# should be used to determine the date range. The use of sp_d_# is only required if your search form contains the option to search either by a custom range (by way of sp_date_range_# ), or by a specific start and end date range.

7

sp_date_range

sp_date_range= number

Specifies a pre-defined date range to apply to the search. Values greater than or equal to zero specify the number of days to search prior to today — for example, a value of "0" specifies "today," a value of "1" specifies "today and yesterday," a value of "30" specifies "within the last 30 days," and so forth.

Values below zero specify a custom range as follows:

-1 = "None," the same as specifying no date range.

-2 = "This week," which searches from Sunday to Saturday of the current week.

-3 = "Last week," which searches from Sunday to Saturday of the week prior to the current week.

-4 = "This month," which searches dates within the current month.

-5 = "Last month," which searches dates within the month prior to the current month.

-6 = "This year," which searches dates within the current year.

-7 = "Last year," which searches dates within the year prior to the current year.

8

sp_date_range_#

sp_date_range_#= number

Specifies a pre-defined date range to apply to the corresponding sp_q_# query. The "#" is replaced with a number between 1 and 16 (for example, sp_date_range_8 , applies to the numbered query sp_q_8 ).

Values greater than or equal to zero specify the number of days to search prior to today. For example, a value of 0 specifies today; a value of 1 specifies today and yesterday; a value of 30 specifies within the last 30 days, and so forth.

Values below zero specify a custom range as follows:

-1 = "None," the same as specifying no date range.

-2 = "This week," which searches from Sunday to Saturday of the current week.

-3 = "Last week," which searches from Sunday to Saturday of the week prior to the current week.

-4 = "This month," which searches dates within the current month.

-5 = "Last month," which searches dates within the month prior to the current month.

-6 = "This year," which searches dates within the current year.

-7 = "Last year," which searches dates within the year prior to the current year.

9

sp_dedupe_field

sp_dedupe_field= fieldname

Specifies a single field to dedupe search results on. All duplicate results on that field are removed from the search results. For example, if for sp_dedupe_field=title , only the top result for a given title is displayed in the search results (no two results will have identical title field content). For multi-value (allow list) type fields, the entire field contents are used for comparison. Only one field may be specified. A "table-qualifier" is not allowed in the field name.

10

sp_e

sp_e= number

Specifies that automatic wildcard expansion should take place for any word from the query string with more than number characters. In other words, sp_e=5 specifies that words with 5 or more characters, like "query" or "number", should be expanded with the wildcard character '*', making the search equivalent to a search for "query*" or "number*". Words with fewer characters are not expanded, so a search for "word" would not have automatic wildcard expansion.

11

sp_e_#

sp_e_#= number

Specifies that automatic wildcard expansion takes place for any word from the corresponding sp_q_# query string with more than number characters. In other words, sp_e_2=5 specifies that words with five or more characters in the sp_q_2 query string, like "query" or "number", should be expanded with the wildcard character ' * ', making the search equivalent to a search for "query*" or "number*". Words with fewer characters are not expanded, so a search for "word" in sp_q_2 would not have automatic wildcard expansion.

12

sp_end_day, sp_end_month, sp_end_year

sp_end_day= number,sp_end_month= number, sp_end_year= number

This triplet of values specifies the end date range for the search and must be provided as a set.

13

sp_f

sp_f= string

Specifies the character set of the query parameter strings (such as sp_q ). This string must always match the character set of the page that contains the search form.

14

sp_field_table

sp_field_ table=table: field,field...

Defines a logical data table consisting of the given fields. For example, a table named "items" consisting of the fields "color," "size," and "price" would be defined as the following:

sp_field_table=items:color,size,price

Logical tables are most useful in conjunction with fields that have "Allow Lists" checked (under Settings > Metadata > Definitions ). All CGI parameters and template tags that take a field name as a value may optionally specify a table name followed by a "." prior to the field name (for example, sp_x_1=tablename.fieldname ).

For example, to perform a search for documents that contain one or more "red" items in size "large" (where items are represented as parallel rows of metadata), you could use the following:

sp_q_exact_1=red&sp_x_1=items.color& sp_q_exact_2=large&sp_x_2=items.size&sp_field_table=items:color,size,price

15

sp_i

sp_i= value

Ignores the search when you generate reports.

Use this query to mask certain backend searches, such as searches that Did You Mean generates, or searches that an Administrator generates in the member center. Because an end user does not generate these types of searches, they do not show up in various Adobe Search&Promote reports.

Valid values are sp_i=1 and sp_i=2 .

16

sp_k

sp_k= string

Specifies the collection to use for the search. The default is no collection, meaning that the search should include the whole site.

See Using collections in search forms .

17

sp_l

sp_l= string

Specifies the language of the query parameter strings (such as sp_q ). The string should be a standard locale ID containing an ISO-639 language code optionally followed by an ISO-3166 country code. For example, "en" or "en_US" for English or "ja" or "ja_JP" for Japanese.

18

sp_literal

sp_literal= 0 or 1

Setting sp_literal=1 temporarily disables all features that might interpret the words in the query. With this parameter, only the literal words of the query match documents, regardless of synonyms, alternate word forms, and sound-alike matching.

Note that sp_literal=0 has no meaning, and is ignored if used.

See About Dictionaries .

19

sp_m

sp_m= number

Specifies whether summaries are displayed. 1 is yes, 0 is no. The default is 1.

20

sp_n

sp_n= number

Specifies the number of the result that starts the search results. The default is 1.

21

sp_not_found_page

sp_not_found_page= url

Specifies whether to redirect to the specified URL if there are no search results.

22

sp_p

sp_p= any/all/phrase

Specifies the default type of searching to perform. The use of any means search for documents that contain any word from the query string. The use of all means search for documents that contain all of the words in the query string. The use of phrase means the query string is treated as if it were a quoted phrase and all user-typed quotes are ignored.

For phrase and all , the specification of "+" and "-" before search words is disabled and those characters are ignored. If sp_p is not present, or if it is set to an empty string or any, standard "+" and "-" word prefixes are allowed.

See the Search Tips description for more information about using plus ("+") and minus ("-") in searches.

See About Searches .

See the sample advanced search form for examples on using the sp_p parameter.

See Sample advanced search form .

23

sp_p_#

sp_p_#= any/all/phrase

Specifies the default type of searching to be performed with the corresponding sp_q_# query. The "#" is replaced with a number between 1 and 16 (for example, sp_p_8 applies to the numbered query sp_q_8 ). The use of any means return documents that contain any word from the query string. The use of all means return documents that contain all of the words in the query string. The use of phrase means to treat the query string as if it was a complete phrase (and all user-typed quotes are ignored).

If you specify either all or phrase , any plus and minus signs before search words are ignored. If sp_p_# is omitted, or if it is set to an empty string or any , standard "+" and "-" prefixes are allowed.

24

sp_pt

sp_pt= exact/equivalent/compatible

Specifies the type of target matching to apply. The use of exact means yield target matches only in documents that exactly match the query string within target content. The use of equivalent is like exact, except that the order of the words is not important. The use of compatible automatically sets the target matching type based on the value of the sp_p parameter. The use of exact is used if sp_p is all or phrase , otherwise equivalent is used. The default value of sp_pt is compatible .

25

sp_pt_#

sp_pt_#= exact/equivalent/compatible

Specifies the type of target matching to apply with the corresponding sp_q_# query. The "#" is replaced with a number between 1 and 16 (for example, sp_p_8 applies to the numbered query sp_q_8 ). The use of exact means yield target matches only in documents that exactly match the query string within target content. The use of equivalent is like exact , except that the order of the words is not important. The use of compatible automatically sets the target matching type based on the value of the corresponding sp_p_# parameter: exact is used if sp_p_# is all or phrase, otherwise equivalent is used. The default value of sp_pt_# is compatible .

26

sp_q

sp_q= string

Specifies the query string for the search. An empty string leads to no results being shown.

27

sp_q_#

sp_q_#= text

This parameter allows for the creation of multiple queries on search forms. The sp_q_# parameter contains the query string to use in the given numbered query. A search request may reference up to 16 different numbered queries ( sp_q_1 to sp_q_16 ).

For example, submitting the following form returns all documents that contain the words "great" and "books".

Search for: <input type="text" name="sp_q" value="great"> Search for: <input type="text" name="sp_q_1" value="books">

28

sp_q_day, sp_q_month, sp_q_year

sp_q _day_#, sp_q _month_#, sp_q _year_#

sp_q_day= integer value

sp_q_month= integer value

sp_q_year= integer value

sp_q_day_#= integer value

sp_q_month_#= integer value

sp_q_year_#= integer value

These parameters are used to specify an exact date for a particular query. The sp_q_day , sp_q_month , and sp_q_year parameters apply to the main query ( sp_q ).

The # parameter is replaced with a number between 1 and 16 (for example, sp_q_day_6 , which applies to the numbered query sp_q_6 ). By default, all dates are searched relative to Greenwich Mean Time.

The following section of code lets a user to search for the word "orange" in documents dated "Jan. 1st, 2000" in a user-defined field named PublishDate :

<input type="hidden" name="sp_x_1" value="PublishDate"> Search for: <input type="text" name="sp_q" value="orange">On : <input type="text" name="sp_q_day_1" size="2" value="1"> Day<input type="text" name="sp_q_month_1" size="2" value="1"> Month <input type="text" name="sp_q_year_1" size="4" value="2000"> Year 

29

sp_q_location

sp_q_location_#

sp_q_location=latitude/longitude OR areacode OR zipcode

sp_q_location_#= latitude/longitude OR areacode OR zipcode

These parameters associate a location with the main or numbered query. The use of sp_q_location affects the main query, sp_q_location_# (where the # is replaced by a number from 1 to 16), affects the given numbered query. These parameters are used to perform minimum and/or maximum distance proximity searches against the location data indexed for each site page. The format of the value determines its interpretation.

A value in the form DDD (three digits) is interpreted as a US telephone areacode; a value in the form DDDDD or DDDDD-DDDD is interpreted as a US zipcode; and a value in the form ±DD.DDDD±DDD.DDDD is interpreted as a latitude/longitude pair. The signs are required for each value. For example, +38.6317+120.5509 specifies latitude 38.6317, longitude 120.5509.

See About proximity search .

30

sp_q_max_relevant_distance

sp_q_max _relevant _distance _#

sp_q_max_relevant_distance= value

sp_q_max_relevant_distance_#= value

These parameters control the relevance calculation applied to proximity searches. The use of sp_q_max_relevant_distance affects the main query, sp_q_max_relevant_distance_# (where the # is replaced by a number from 1 to 16), affects the given numbered query.

The default value of sp_q_max_relevant_distance is 100.

A perfect relevance score for the proximity component would represent a distance of 0. A minimum relevance score for the proximity component would represent a distance just over the specified sp_q_max_relevant_distance_# value.

See About proximity search .

31

sp_q_min_day, sp_q_min_month, sp_q_min_year

sp_q_max_day, sp_q_max_month, sp_q_max_year

sp_q_min_day_#, sp_q_min_month_#, sp_q_min_year_#

sp_q_max_day_#, sp_q_max_month_#, sp_q_max_year_#

sp_q_min_day=integer value

sp_q_min_month=integer value

sp_q_min_year=integer value

sp_q_max_day=integer value

sp_q_max_month=integer value

sp_q_max_year=integer value

sp_q_min_day_#=integer value

sp_q_min_month_#=integer value

sp_q_min_year_#=integer value

sp_q_max_day_#=integer value

sp_q_max_month_#=integer value

sp_q_max_year_#=integer value

These parameters are used to set minimum and maximum date ranges for a particular query. The sp_q_min_day , sp_q_min_month , sp_q_min_year , sp_q_max_day , sp_q_max_month , and sp_q_max_year parameters apply to the main query ( sp_q ).

The # in the parameter name is replaced with a number between 1 and 16 (for example, sp_q_min_day_6 applies to the numbered query sp_q_6 ).

It is legal to specify only a minimum date, only a maximum date, or both minimum and maximum date. However, for a given minimum or maximum set, all three date parameters must be specified (day, month and year). By default, all dates are searched relative to Greenwich Mean Time.

The following section of code lets a user search for the word "orange" in documents with a date between Jan. 1st, 2000 and Dec. 31st, 2000 in a user-defined field named PublishDate :

<input type="hidden" name="sp_x_1" value="PublishDate">Search for: <input type="text" name="sp_q" value="orange">Between: <input type="text" name="sp_q_min_day_1" size="2" value="1"> Start Day<input type="text" name="sp_q_min_month_1" size="2" value="1"> Start Month <input type="text" name="sp_q_min_year_1" size="4" value="2000"> Start Year And: <input type="text" name="sp_q_max_day_1" size="2" value="31"> End Day <input type="text" name="sp_q_max_month_1" size="2" value="12"> End Month <input type="text" name="sp_q_max_year_1" size="4" value="2000"> End Year

32

sp_q_min, sp_q_max

sp_q _min_#, sp_q _max_#, sp_q _exact_#

sp_q_min= value

sp_q_max= value

sp_q_min_#= value

sp_q_max_#= value

sp_q_exact_#=value

These parameters specify a minimum (and/or maximum) value to apply to the main or numbered query. The use of sp_q_min , sp_q_max , and sp_q_exact affect the main query ( sp_q ).

Replace # in the parameter name with a number between 1 and 16 (for example, sp_q_min_8 applies to the numbered query sp_q_8 ).

The use of sp_q_exact_# is shorthand for specifying both sp_q_min_# and sp_q_max_# with the same value. If sp_q_exact_# is specified, any corresponding sp_q_min_# or sp_q_max_# parameters are ignored.

The sp_q_min_# , sp_q_max_# and sp_q_exact_# parameters may optionally specify multiple "|" separated values. For example, to search for documents that contain the value green or red within the "color" field: ...&sp_q_exact_1=green|red&sp_x_1=color .

33

sp_q_nocp

sp_q _nocp _#

sp_q_nocp= 1 or 0

sp_q_nocp_#= 1 or 0

The default parameter value is 0 meaning that Common Phrase expansions are performed.

When set to 1 for the corresponding search query, Common Phrases expansions are not performed.

Using sp_q_nocp affects the main search query parameter sp_q . To apply this parameter to a numbered search query, replace # in the parameter name with the corresponding number. For example, sp_q_nocp_8 applies to the numbered search query sp_q_8 .

34

sp_q_required

sp_q _required _#

sp_q_required= 1 or 0 or -1

sp_q_required_#= 1 or 0 or -1

This parameter determines whether a match must (1), may (0), or must not (-1) occur in the corresponding query in order for a document to be returned on the result page.

The use of sp_q_required affects the main query ( sp_q ).

To apply to a numbered query, replace the # in the parameter name with the corresponding number (for example, sp_q_required_8 applies to the numbered query sp_q_8 ). The default value of the parameter is 1 (must match).

To search for documents that contain the word "calc" but do NOT contain "mac", "win" or "all" in the user-defined "platform" field, your HTML search form could contain the following lines:

<input type="hidden" name="sp_x_1" value="platform"> Search for: <input type="text" name="sp_q" value="calc"> Exclude: <input type="text" name="sp_q_1" value="mac win all"> <input type="hidden" name="sp_q_required_1" value="-1">

35

sp_redirect_ if_one_result

sp_redirect_ if_one_result= 0 or 1

Specifies whether to redirect to the search result URL if there is only one search result.

36

sp_referrer

sp_referrer= url

Specifies the referrer URL for the search. Useful for search rewrite rules where the search results link back to the same site as the search form.

The default value is the standard CGI HTTP_REFERRER value delivered by the browser.

37

sp_ro

sp_ro= field : relevance

Allows optional search time, per field name, relevance control. The ro in the parameter name stands for "relevance override". The parameter accepts one or more field names, followed by a colon character, followed by a relevance value from 0-10.

For example, to set the relevance value for the field name "body" to 10, at the time a customer performs a search, the parameter would appears as follows:

sp_ro=body:10

Or, to specify multiple field relevance overrides in the parameter string, you can use a pipe delimiter. For example, to set the relevance value for the field names "body" and "title" to 9, at the time a customer performs a search, the parameter would appear as follows:

sp_ro=body:9|title:9

Note: Specifying a field that is not involved in the associated search has no effect. For example, if you set sp_ro=title:10 , but the title field name is not searched, the sp_ro parameter has no effect. In other words, specifying a field name using the sp_ro parameter does not automatically search that field; instead, it only overrides that field's associated relevance setting.

See Editing pre-defined or user-defined meta tag fields .

See About Query Cleaning Rules .

38

sp_s

sp_s= number

Specifies the sort order. Zero (0) is the default and means to sort by relevance score. One (1) means to sort by date and -1 means to not sort.

You can specify a field name for the value of the sp_s parameter. For example, sp_s=title sorts results according to the values that are contained in the title field. When a field name is used for the value of an sp_s parameter, results are sorted by that field and then sub-sorted by relevance.

Set Sorting for the referenced field to either Ascending or Descending in Settings > Metadata > Definitions to enable this feature.

You can also assign several sort fields to a single query by setting the sp_s parameter several times in the search form. The following template lines sets the search results to be sorted first by artist name, then by album name, and then by track name.

<input type="hidden" name="sp_s" value="artist"> <input type="hidden" name="sp_s" value="album"> <input type="hidden" name="sp_s" value="track"> Search for: <input type="text" name="sp_q" value="Music Search">

It is also possible to sort on table matched field data by specifying a table name qualifier prior to the field name, for example, items.price. See the sp_field_table parameter for more information on table matching.

If searching by proximity, you may sort results according to proximity by specifying a "proximity output field".

See About proximity search .

39

sp_sr

sp_sr= field

Specifies the rank field to use for static ranking. The field must be a field of type Rank with relevance greater than 0. If no sp_sr parameter is provided for the query, a field of type Rank is automatically selected.

To disable static ranking for a particular query, include a NULL value for sp_sr (for example, <input type="hidden" name="sp_sr" value=""> ).

40

sp_sfvl_field

sp_sfvl_field= string

Specifies the name of a field to use in conjunction with the search-field-value-list tag in the search template.

You can specify multiple sp_sfvl_field parameters.

41

sp_sfvl_df_count

sp_sfvl_df_count= <integer_value>

Requests up to <integer_value> search-field-value-list dynamic-facet fields for this search.

The default value is 0. The maximum allowed value is the current number of dynamic-facet fields, dynamic-facet-field-count defined for a given index. Integer values that are below 0 are treated as 0. Integer values specified above dynamic-facet-field-count are capped at dynamic-facet-field-count . Non-integer values are ignored; they are treated as the default value.

A given slice's search is capped with a maximum allowed sp_sfvl_df_count value of this slice's dynamic-facet-field-count value. When merging slice results, the effective maximum value of sp_sfvl_df_count is the maximum actual sp_sfvl_df_count across all slices.

See Configuring dynamic facets .

42

sp_sfvl_df_exclude

sp_sfvl_df_exclude= < field_name >[|< field_name >|...

Specifies a list of specific dynamic facet fields to exclude from consideration for this search.

By default, all dynamic facet fields are considered.

See Configuring dynamic facets .

43

sp_sfvl_df_include

sp_sfvl_df_include= < field_name >[|< field_name >|...

Specifies a list of specific dynamic facet fields to include in the search results.

Note: The sp_sfvl_df_count parameter determines the total number of dynamic facet fields to return, including any specified by way of sp_sfvl_df_include . That is, using sp_sfvl_df_include does not allow the total count of returned dynamic facet fields to exceed sp_sfvl_df_count .

See Configuring dynamic facets .

44

sp_staged

sp_staged= 0 or 1

If sp_staged=1 is submitted with a query, the query that is run is a staged search.

A staged search uses all the components that are currently staged including the index and templates.

45

sp_start_day, sp_start_month, sp_start_year

sp_start_day= number

sp_start_month= number

sp_start_year= number

This triplet of values specifies the starting date range for the search and you provide it as a set.

46

sp_ suggest _q

sp_suggest_q= number

The sp_suggest_q parameter determines which sp_q[_#] parameter to use with the Suggest service.

The default value of sp_suggest_q is 0, which means that the search engine uses the value of sp_q to determine the suggestions.

Set sp_suggest_q=1 to use the value of sp_q_1 to determine the suggestions, and so on.

47

sp_t

sp_t= string

Specifies the transport template to use.

This parameter is useful if you want to control the appearance of core search results across your website by using different search transport templates for each area in your Search account.

The default transport template is "search".

See Managing multiple transport templates for your website .

48

sp_trace

sp_trace= 0 or 1

When set as sp_stage=1 , enables the core search trace capability in Simulator.

See About Simulator .

Note: If this parameter is not specified, core search does not gather the tracing information and the related core search template tags have no output.

49

sp_w, sp_w_control

sp_w= sound-alike-enable

sp_w_control=sound-alike-control

Specifies that sound-alike matching should be enabled or disabled for this particular query.

The sp_w_control for `Exact` is Ignored. Sound-alike matching is Disabled.

The sp_w_control for `Alike` is Ignored. Sound-alike matching is Enabled

The sp_w_control for Anything else is 1. Sound-alike matching is Disabled.

The sp_w_control for Anything else is anything else. Sound-alike matching is Enabled.

The sp_w_control parameter lets you create a negatively or positively worded checkbox for end-user control of sound-alike matching.

If sp_w_control=0 is used, then a negatively worded checkbox is used to set the sp_w parameter as in the following example:

<input type=hidden name="sp_w_control" value="0"><input type=checkbox name="sp_w" value="exact">No Sound-Alike matching

If sp_w_control=1 is used, then a positively worded checkbox is used to set the sp_w parameter as in the following:

<input type=hidden name="sp_w_control" value="1"><input type=checkbox name="sp_w" value="alike">Sound-Alike matching

See the sample advanced search form for more examples on using sp_w_control and sp_w parameters.

See Sample advanced search form .

50

sp_x

sp_x= field

Specifies the fields to search for the query string. any means search all fields. title means search only title fields. desc means search only document description fields. keys means search only document keywords. body means search only body text. alt means search only alternate text. url means search only the URL values. target means search only target keywords. In any of these cases, user specification of "text:", "desc:", "keys:", "body:", "alt:", "url:", and "target:" field prefixes within the corresponding sp_q parameter are ignored. If sp_x is not present or if it is set to an empty string or any, then the standard user field prefixes are allowed. See the Search Tips description for more information about the field prefixes.

See About Searches .

See the sample Advanced Search Form description for examples using the sp_x parameter.

See Sample advanced search form .

You can create queries that search all fields set to Search By Default under Options > Metadata > Definitions by setting sp_x=any . Both pre- and user-defined fields may be used as the value of the sp_x parameter.

You can also assign several fields to a single query by setting the sp_x parameter several times. The following template lines let users query both the "title" and "author" fields for "Great Books".

<input type="hidden" name="sp_x" value="title"><input type="hidden" name="sp_x" value="author">Search for: <input type="text" name="sp_q" value="Great Books">

51

sp_x_#

sp_x_#= field-name

This parameter specifies which field to search in the corresponding sp_q_# query. The # is replaced with a number between 1 and 16 (for example, sp_x_8 ). The field-name is any pre- or user-defined field.

If no sp_x_# parameter is provided for a particular numbered query, all fields defined as Search By Default as set under Setting > Metadata > Definitions are searched by that query.

For example, submitting the following form returns all documents that contain the word "great" that also contain the word "Fitzgerald" in the "author" field:

Search for: <input type="text" name="sp_q" value="great"><input type="hidden" name="sp_x_1" value="author">Search only documents written by: <input type="text" name="sp_q_1" value="Fitzgerald">

You can associate multiple field names with a particular query or numbered query by providing more than one instance of the same sp_x or sp_x_# parameter in a single search request.

For example, to search for the word "flower" within both the "body" and "keys" fields, you could create a search form with the following information:

<input type="hidden" name="sp_x_1" value="body"><input type="hidden" name="sp_x_1" value="keys">Search for: <input type="text" name="sp_q_1" value="flower">

A typical example of using backend search CGI parameters

The following link queries start a search using “Music” as the search query, and uses all the default parameters. Note that the URL is split across two lines for readability. In your HTML, this link should all be on one line.

<a href="https://search.atomz.com/search/?sp_q=Music&sp_a=sp99999999"> 
Testing...</a>

The same functionality is more typically defined with a form:

<form action="https://search.atomz.com/search/"> 
<input size=12 name="sp_q" value="Music"><br> 
<input type=hidden name="sp_a" value="sp99999999"> 
<input type=submit value="Search"><br> 
</form>

You should typically use default parameters when initiating a search. That way, the first page is shown, sorted by relevance, and allows the customer to choose other pages and other options. If the search form on your site includes options for collections, pass in the collection name as a parameter.

A detailed example of using backend search CGI parameters

The following form queries display 25 results starting at result 10. Summaries are not shown, the sort order is by date, and the collection named support is used. Only documents dated within the last 30 days are returned.

<form action="https://search.atomz.com/search/"> 
<input size=12 name="sp_q"><br> 
<input type=hidden name="sp_a" value="sp99999999"> 
<input type=submit value="Search"><br> 
<input type=hidden name=sp_n value=10> 
<input type=hidden name=sp_c value=25> 
<input type=hidden name=sp_m value=0> 
<input type=hidden name=sp_s value=1> 
<input type=hidden name=sp_k value="support"> 
<input type=hidden name=sp_date_range value=30> 
</form>

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now