UpdateFeaturedResultsSetCommand

Updates a set of featured results. Features results are placed above all other results for certain queries. You map specific queries to specific documents for featuring in the results. If a query contains an exact match of a query, then one or more specific documents are featured in the search results.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { KendraClient, UpdateFeaturedResultsSetCommand } from "@aws-sdk/client-kendra"; // ES Modules import
// const { KendraClient, UpdateFeaturedResultsSetCommand } = require("@aws-sdk/client-kendra"); // CommonJS import
const client = new KendraClient(config);
const input = { // UpdateFeaturedResultsSetRequest
  IndexId: "STRING_VALUE", // required
  FeaturedResultsSetId: "STRING_VALUE", // required
  FeaturedResultsSetName: "STRING_VALUE",
  Description: "STRING_VALUE",
  Status: "ACTIVE" || "INACTIVE",
  QueryTexts: [ // QueryTextList
    "STRING_VALUE",
  ],
  FeaturedDocuments: [ // FeaturedDocumentList
    { // FeaturedDocument
      Id: "STRING_VALUE",
    },
  ],
};
const command = new UpdateFeaturedResultsSetCommand(input);
const response = await client.send(command);
// { // UpdateFeaturedResultsSetResponse
//   FeaturedResultsSet: { // FeaturedResultsSet
//     FeaturedResultsSetId: "STRING_VALUE",
//     FeaturedResultsSetName: "STRING_VALUE",
//     Description: "STRING_VALUE",
//     Status: "ACTIVE" || "INACTIVE",
//     QueryTexts: [ // QueryTextList
//       "STRING_VALUE",
//     ],
//     FeaturedDocuments: [ // FeaturedDocumentList
//       { // FeaturedDocument
//         Id: "STRING_VALUE",
//       },
//     ],
//     LastUpdatedTimestamp: Number("long"),
//     CreationTimestamp: Number("long"),
//   },
// };

UpdateFeaturedResultsSetCommand Input

Parameter
Type
Description
FeaturedResultsSetId
Required
string | undefined

The identifier of the set of featured results that you want to update.

IndexId
Required
string | undefined

The identifier of the index used for featuring results.

Description
string | undefined

A new description for the set of featured results.

FeaturedDocuments
FeaturedDocument[] | undefined

A list of document IDs for the documents you want to feature at the top of the search results page. For more information on the list of featured documents, see FeaturedResultsSet .

FeaturedResultsSetName
string | undefined

A new name for the set of featured results.

QueryTexts
string[] | undefined

A list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet .

Status
FeaturedResultsSetStatus | undefined

You can set the status to ACTIVE or INACTIVE. When the value is ACTIVE, featured results are ready for use. You can still configure your settings before setting the status to ACTIVE. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ACTIVE or INACTIVE.

UpdateFeaturedResultsSetCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
FeaturedResultsSet
FeaturedResultsSet | undefined

Information on the set of featured results. This includes the identifier of the featured results set, whether the featured results set is active or inactive, when the featured results set was last updated, and more.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have sufficient access to perform this action. Please ensure you have the required permission policies and user accounts and try again.

FeaturedResultsConflictException
client

An error message with a list of conflicting queries used across different sets of featured results. This occurred with the request for a new featured results set. Check that the queries you specified for featured results are unique per featured results set for each index.

InternalServerException
server

An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes and try again, or contact Support  for help.

ResourceNotFoundException
client

The resource you want to use doesn’t exist. Please check you have provided the correct resource and try again.

ThrottlingException
client

The request was denied due to request throttling. Please reduce the number of requests and try again.

ValidationException
client

The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct input and try again.

KendraServiceException
Base exception class for all service exceptions from Kendra service.