def index(self, index, doctype, body, docid=None, op_type=None, parent=None, routing=None):
        args = dict()
        if op_type:
            args["op_type"] = op_type

        if parent:
            args["parent"] = parent

        if routing:
            args["routing"] = routing

        path = self._make_path([index, doctype, str(docid)])
        self.send_request('POST', path, body=body, query_string_args=args)
        rescode = self.last_response.status_code
        if 200 <= rescode < 300:
            return True
        elif rescode == 409 and op_type == "create":
            # If document already exists, ES returns 409
            return True
        else:
            return False
Unsupported types should all raise exceptions
dataset/ETHPy150Open eriky/ESClient/esclient.py/ESClient.index--crossover with--dataset/ETHPy150Open mapbox/rasterio/tests/test_features.py/test_rasterize_unsupported_dtype