Hi,
I’m using the latest python sdk and testing it out for a project. I’m able to create a bucket but when I want to create an index, the call fails. I’m unable to understand the error. Can somebody help to resolve this?
The code:
qstr = ‘CREATE PRIMARY INDEX id ON first USING GSI’
try:
result = cb_cluster.query(qstr).rows()
print(result)
except CouchbaseException as ce:
print(ce)
Error
<RC=0xD0[LCB_ERR_PARSING_FAILURE (208)], HTTP Request failed. Examine ‘objextra’ for full result, Results=1, C Source=(src/pycbc_http.c,212), OBJ=ViewResult<rc=0xD0[LCB_ERR_PARSING_FAILURE (208)], value={‘requestID’: ‘11bda1a7-fae1-423f-94b4-c9009e37bcbf’, ‘clientContextID’: ‘80956feef55270df’, ‘errors’: [{‘code’: 3000, ‘msg’: ‘syntax error - at first’}], ‘status’: ‘fatal’}, http_status=0, tracing_context=0, tracing_output=None>, Context={‘first_error_code’: 3000, ‘http_response_code’: 400, ‘first_error_message’: ‘syntax error - at first’, ‘statement’: ‘CREATE PRIMARY INDEX id ON first USING GSI’, ‘client_context_id’: ‘80956feef55270df’, ‘query_params’: ‘’, ‘http_response_body’: ‘’, ‘endpoint’: ‘localhost:8093’, ‘type’: ‘QueryErrorContext’}, Tracing Output={":nokey:0": null}>
I don’t understand why the ‘endpoint’: ‘localhost:8093’ when I’ve specified in the cluster connect as 8091.
Thanks,
Kashyap