:doc:`CloudSearch <../../cloudsearch>` / Client / index_documents

***************
index_documents
***************



.. py:method:: CloudSearch.Client.index_documents(**kwargs)

  

  Tells the search domain to start indexing its documents using the latest indexing options. This operation must be invoked to activate options whose  OptionStatus is ``RequiresIndexDocuments``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudsearch-2013-01-01/IndexDocuments>`_  


  **Request Syntax**
  ::

    response = client.index_documents(
        DomainName='string'
    )
    
  :type DomainName: string
  :param DomainName: **[REQUIRED]** 

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

    

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

    
    ::

      {
          'FieldNames': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The result of an ``IndexDocuments`` request. Contains the status of the indexing operation, including the fields being indexed.

      
      

      - **FieldNames** *(list) --* 

        The names of the fields that are currently being indexed.

        
        

        - *(string) --* 

          A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.

           

          Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.

           

          The name ``score`` is reserved and cannot be used as a field name. To reference a document's ID, you can use the name ``_id``.

          
    
  
  **Exceptions**
  
  *   :py:class:`CloudSearch.Client.exceptions.BaseException`

  
  *   :py:class:`CloudSearch.Client.exceptions.InternalException`

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

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

  