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

***************
submit_feedback
***************



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

  

  Enables you to provide feedback to Amazon Kendra to improve the performance of your index.

   

  ``SubmitFeedback`` is currently not supported in the Amazon Web Services GovCloud (US-West) region.

  

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


  **Request Syntax**
  ::

    response = client.submit_feedback(
        IndexId='string',
        QueryId='string',
        ClickFeedbackItems=[
            {
                'ResultId': 'string',
                'ClickTime': datetime(2015, 1, 1)
            },
        ],
        RelevanceFeedbackItems=[
            {
                'ResultId': 'string',
                'RelevanceValue': 'RELEVANT'|'NOT_RELEVANT'
            },
        ]
    )
    
  :type IndexId: string
  :param IndexId: **[REQUIRED]** 

    The identifier of the index that was queried.

    

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

    The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the ``Query`` API.

    

  
  :type ClickFeedbackItems: list
  :param ClickFeedbackItems: 

    Tells Amazon Kendra that a particular search result link was chosen by the user.

    

  
    - *(dict) --* 

      Gathers information about when a particular result was clicked by a user. Your application uses the ``SubmitFeedback`` API to provide click information.

      

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

        The identifier of the search result that was clicked.

        

      
      - **ClickTime** *(datetime) --* **[REQUIRED]** 

        The Unix timestamp when the result was clicked.

        

      
    

  :type RelevanceFeedbackItems: list
  :param RelevanceFeedbackItems: 

    Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.

    

  
    - *(dict) --* 

      Provides feedback on how relevant a document is to a search. Your application uses the ``SubmitFeedback`` API to provide relevance information.

      

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

        The identifier of the search result that the user provided relevance feedback for.

        

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

        Whether the document was relevant or not relevant to the search.

        

      
    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`kendra.Client.exceptions.ValidationException`

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

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

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

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

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

  