Adds an index to this map for the specified entries so that queries can run faster.

        Example:
            Let's say your map values are Employee objects.
                >>> class Employee(IdentifiedDataSerializable):
                >>>     active = false
                >>>     age = None
                >>>     name = None
                >>>     #other fields
                >>>
                >>>     #methods

            If you query your values mostly based on age and active fields, you should consider indexing these.
                >>> map = self.client.get_map("employees")
                >>> map.add_index("age" , true) #ordered, since we have ranged queries for this field
                >>> map.add_index("active", false) #not ordered, because boolean field cannot have range


        :param attribute: (str), index attribute of the value.
        :param ordered: (bool), for ordering the index or not (optional).

def add_index(self, attribute, ordered=False):
        """
        Adds an index to this map for the specified entries so that queries can run faster.

        Example:
            Let's say your map values are Employee objects.
                >>> class Employee(IdentifiedDataSerializable):
                >>>     active = false
                >>>     age = None
                >>>     name = None
                >>>     #other fields
                >>>
                >>>     #methods

            If you query your values mostly based on age and active fields, you should consider indexing these.
                >>> map = self.client.get_map("employees")
                >>> map.add_index("age" , true) #ordered, since we have ranged queries for this field
                >>> map.add_index("active", false) #not ordered, because boolean field cannot have range


        :param attribute: (str), index attribute of the value.
        :param ordered: (bool), for ordering the index or not (optional).
        """
        return self._encode_invoke(map_add_index_codec, attribute=attribute, ordered=ordered)