GET
/
query-rewrite
/
instances
/
{id}
Get a query rewrite
curl --request GET \
  --url https://{FUSION HOST}/api/query-rewrite/instances/{id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "type": "banner",
  "id": "<string>",
  "source": "<string>",
  "sourceType": "<string>",
  "createdOn": "2023-11-07T05:31:56Z",
  "updatedOn": "2023-11-07T05:31:56Z",
  "reviewer": "<string>",
  "reviewedOn": "2023-11-07T05:31:56Z",
  "review": "auto",
  "deployed": true,
  "tags": [
    "<string>"
  ],
  "is_deleted": true,
  "base_object_id_s": "<string>",
  "doc_type": "<string>",
  "description": "<string>",
  "priority": 1,
  "matching": "<string>",
  "groups": "<string>",
  "rollup": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The query rewrite ID.

Query Parameters

context
string
required

The app to which this object belongs, as app:SomeApp. If the app doesn't exist, the request fails. Other comma-separated contexts in the context parameter are allowed but ignored.

editSessionId
string

An edit session ID filter. Equivalent to a Fusion username.

Response

200 - */*

OK

type
enum<string>
required

The type of rule, written in snake case. In the Fusion UI, some of these types correspond to the types in the Rewrites Manager and others correspond to actions in the Rules Manager.

  • banner - A rule that adds an HTML-formatted banner to query responses.
  • block_list - A rule that blocks values from appearing in query results.
  • boost_attributes - A rule that boosts documents in query results.
  • boost_list - A rule that boosts documents with a large multiplicative boost.
  • bury_list - A rule that buries documents so they are minimized but not blocked.
  • filter_list - A rule that applies filter queries (fq) to matching queries.
  • ground_truth - A query rewrite that estimates ground truth queries using click signals and query signals.
  • ingroup_boost_list - A rule that boosts an item within a product group.
  • ingroup_bury_list - A rule that buries an item within a product group.
  • ingroup_pinned - A rule that pins a document to a specific location within a product group.
  • json_blob - A rule that returns an arbitrary JSON blob for display outside of the search results.
  • phrase - A query rewrite that boosts phrases when they appear in queries.
  • pinned - A rule that pins a document to a specific location within the search results.
  • redirect - A rule that adds a redirect message to the query response.
  • removeWords - A query rewrite that removes phrases from queries.
  • response_value - A rule that sends an arbitrary value to the front end or pipeline.
  • set_facets - A rule that customizes the facets returned in the query response.
  • set_params - A rule that sets a parameter name and value to a search query.
  • simq - A query rewrite that detects overlap between the results of similar queries.
  • spell - A query rewrite that maps misspellings to their corrected spellings.
  • synonym - A query rewrite that maps query terms to their synonyms.
  • tail - A query rewrite that replaces under-performing queries with queries that produce higher click-through rates.
Available options:
banner,
block_list,
boost_attributes,
boost_list,
bury_list,
filter_list,
ground_truth,
ingroup_boost_list,
ingroup_bury_list,
ingroup_pinned,
json_blob,
phrase,
pinned,
redirect,
removeWords,
response_value,
set_facets,
set_params,
simq,
spell,
synonym,
tail
id
string
required

A unique ID for the query rewrite.

createdOn
string<date-time>
required

A timestamp value that describes when the rule was created.

updatedOn
string<date-time>
required

A timestamp value that describes when the rule was last modified.

review
enum<string>
required

The query rewrite's review status.

Available options:
auto,
pending,
approved,
denied,
supplied
deployed
boolean
required

Describes whether the query rewrite is published.

When true, the query rewrite is published and the latest changes are live. When false, the latest changes are not live, though previous versions may be live.

is_deleted
boolean
required

Describes whether the query rewrite is marked for deletion.

When true, the query rewrite will be deleted when the latest changes are published. When false, the query rewrite will not be deleted when the latest changes are published.

base_object_id_s
string
required

A unique ID for the query rewrite. Matches the value of id.

doc_type
string
required

Either query_rewrite or rule.

priority
integer
default:1
required

Specifies the rule’s precedence when multiple rules could apply to the same query.

Higher values indicate higher precedence: the rule with the highest precedence is applied last and takes final effect. For example, a rule with precedence 3 will override a rule with precedence 2.

If two rules have the same precedence, the more recently created rule takes precedence.

matching
string
required
rollup
string
required
source
string

The name of the store that made the update.

sourceType
string

The type the store that made the update.

reviewer
string
reviewedOn
string<date-time>
tags
string[]

An array of conditional tags that are used to restrict the triggering of the query rewrite.

description
string

The rule description.

groups
string