:doc:`kendra <../../kendra>` / Client / create_featured_results_set

***************************
create_featured_results_set
***************************



.. py:method:: kendra.Client.create_featured_results_set(**kwargs)

  

  Creates a set of featured results to display at the top of the search results page. Featured 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, then one or more specific documents are featured in the search results.

   

  You can create up to 50 sets of featured results per index. You can request to increase this limit by contacting `Support <http://aws.amazon.com/contact-us/>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/CreateFeaturedResultsSet>`_  


  **Request Syntax**
  ::

    response = client.create_featured_results_set(
        IndexId='string',
        FeaturedResultsSetName='string',
        Description='string',
        ClientToken='string',
        Status='ACTIVE'|'INACTIVE',
        QueryTexts=[
            'string',
        ],
        FeaturedDocuments=[
            {
                'Id': 'string'
            },
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type IndexId: string
  :param IndexId: **[REQUIRED]** 

    The identifier of the index that you want to use for featuring results.

    

  
  :type FeaturedResultsSetName: string
  :param FeaturedResultsSetName: **[REQUIRED]** 

    A name for the set of featured results.

    

  
  :type Description: string
  :param Description: 

    A description for the set of featured results.

    

  
  :type ClientToken: string
  :param ClientToken: 

    A token that you provide to identify the request to create a set of featured results. Multiple calls to the ``CreateFeaturedResultsSet`` API with the same client token will create only one featured results set.

    

  
  :type Status: string
  :param Status: 

    The current status of the set of featured results. When the value is ``ACTIVE``, featured results are ready for use. You can still configure your settings before setting the status to ``ACTIVE``. You can set the status to ``ACTIVE`` or ``INACTIVE`` using the `UpdateFeaturedResultsSet <https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateFeaturedResultsSet.html>`__ API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ``ACTIVE`` or ``INACTIVE``.

    

  
  :type QueryTexts: list
  :param QueryTexts: 

    A list of queries for featuring results. For more information on the list of queries, see `FeaturedResultsSet <https://docs.aws.amazon.com/kendra/latest/dg/API_FeaturedResultsSet.html>`__.

    

  
    - *(string) --* 

    

  :type FeaturedDocuments: list
  :param FeaturedDocuments: 

    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 documents, see `FeaturedResultsSet <https://docs.aws.amazon.com/kendra/latest/dg/API_FeaturedResultsSet.html>`__.

    

  
    - *(dict) --* 

      A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

      

    
      - **Id** *(string) --* 

        The identifier of the document to feature in the search results. You can use the `Query <https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html>`__ API to search for specific documents with their document IDs included in the result items, or you can use the console.

        

      
    

  :type Tags: list
  :param Tags: 

    A list of key-value pairs that identify or categorize the featured results set. You can also use tags to help control access to the featured results set. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols:_ . : / = + - @.

    

  
    - *(dict) --* 

      A key-value pair that identifies or categorizes an index, FAQ, data source, or other resource. TA tag key and value can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, data source, or other resource.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The value associated with the tag. The value may be an empty string but it can't be null.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'FeaturedResultsSet': {
              'FeaturedResultsSetId': 'string',
              'FeaturedResultsSetName': 'string',
              'Description': 'string',
              'Status': 'ACTIVE'|'INACTIVE',
              'QueryTexts': [
                  'string',
              ],
              'FeaturedDocuments': [
                  {
                      'Id': 'string'
                  },
              ],
              'LastUpdatedTimestamp': 123,
              'CreationTimestamp': 123
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **FeaturedResultsSet** *(dict) --* 

        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 created, and more.

        
        

        - **FeaturedResultsSetId** *(string) --* 

          The identifier of the set of featured results.

          
        

        - **FeaturedResultsSetName** *(string) --* 

          The name for the set of featured results.

          
        

        - **Description** *(string) --* 

          The description for the set of featured results.

          
        

        - **Status** *(string) --* 

          The current status of the set of featured results. When the value is ``ACTIVE``, featured results are ready for use. You can still configure your settings before setting the status to ``ACTIVE``. You can set the status to ``ACTIVE`` or ``INACTIVE`` using the `UpdateFeaturedResultsSet <https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateFeaturedResultsSet.html>`__ API. The queries you specify for featured results must be unique per featured results set for each index, whether the status is ``ACTIVE`` or ``INACTIVE``.

          
        

        - **QueryTexts** *(list) --* 

          The list of queries for featuring results.

           

          Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

          
          

          - *(string) --* 
      
        

        - **FeaturedDocuments** *(list) --* 

          The list of document IDs for the documents you want to feature at the top of the search results page. You can use the `Query <https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html>`__ API to search for specific documents with their document IDs included in the result items, or you can use the console.

           

          You can add up to four featured documents. You can request to increase this limit by contacting `Support <http://aws.amazon.com/contact-us/>`__.

           

          Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify 'Kendra', queries such as 'How does kendra semantically rank results?' will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.

          
          

          - *(dict) --* 

            A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then the document is featured in the search results.

            
            

            - **Id** *(string) --* 

              The identifier of the document to feature in the search results. You can use the `Query <https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html>`__ API to search for specific documents with their document IDs included in the result items, or you can use the console.

              
        
      
        

        - **LastUpdatedTimestamp** *(integer) --* 

          The Unix timestamp when the set of featured results was last updated.

          
        

        - **CreationTimestamp** *(integer) --* 

          The Unix timestamp when the set of featured results was created.

          
    
  
  **Exceptions**
  
  *   :py:class:`kendra.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`kendra.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`kendra.Client.exceptions.FeaturedResultsConflictException`

  
  *   :py:class:`kendra.Client.exceptions.ValidationException`

  
  *   :py:class:`kendra.Client.exceptions.ThrottlingException`

  
  *   :py:class:`kendra.Client.exceptions.ConflictException`

  
  *   :py:class:`kendra.Client.exceptions.InternalServerException`

  