FTS - TooManyClauses error is not being returned when using the Go SDK

Hi all,

I am using NewRegexpQuery to do a regex query on FTS.
When I do a query that returns a lot of results, I get the results status object with:
Total = 6
Failed=6
Successful=0

And the Errors field is empty (nil)

When I execute the same query via curl - I get the error message: TooManyClauses[maxClauseCount is set to 1024]

Is it a bug in the SDK?
Is there another way to identify this error in the SDK?

Thank you,
Eli.

Hi @Eli_gotesman, I’ve not come across this error before. Could you send over the JSON response that you receive from the server along with the HTTP status please? All FTS errors should behave in the same way so I’m unsure why this one wouldn’t surface through the Go SDK.

Hi @chvck,

This is the response I get:
{“status”:{“total”:6,“failed”:6,“successful”:0,“errors”:{“catalog-item-name-v1_31c77389349acc18_13aa53f3”:“TooManyClauses[maxClauseCount is set to 1024]”,“catalog-item-name-v1_31c77389349acc18_18572d87”:“TooManyClauses[maxClauseCount is set to 1024]”,“catalog-item-name-v1_31c77389349acc18_54820232”:“TooManyClauses[maxClauseCount is set to 1024]”,“catalog-item-name-v1_31c77389349acc18_6ddbfb54”:“TooManyClauses[maxClauseCount is set to 1024]”,“catalog-item-name-v1_31c77389349acc18_aa574717”:“TooManyClauses[maxClauseCount is set to 1024]”,“catalog-item-name-v1_31c77389349acc18_f4e0a48a”:“TooManyClauses[maxClauseCount is set to 1024]”}},“request”:{“query”:{“regexp”:".*bosch.*",“field”:“name”},“size”:100,“from”:0,“highlight”:null,“fields”:[“id”,“name”],“facets”:null,“explain”:false,“sort”:["-_score"],“includeLocations”:false},“hits”:null,“total_hits”:0,“max_score”:0,“took”:158173851,“facets”:null}

The problem is (I think…) that I get status code 200.
This is when I issue the request to our production Couchbase server from my local machine

When I test the same thing with a local Couchbase server on my machine, it works as expected:
status 400 with the following response:

{“error”:“rest_index: Query, indexName: catalog-item-name, err: TooManyClauses[maxClauseCount is set to 1024]”,“request”:{“fields”:["*"],“query”:{“field”:“name”,“regexp”:".*bosch.*"},“size”:10},“status”:“fail”}

Thanks,
Eli

Hi @Eli_gotesman I’ve done a bit of digging into, and reproduced, this. It looks like the Go SDK is handling some errors incorrectly, I’ve raised an issue - https://issues.couchbase.com/browse/GOCBC-489.

Hi @chvck,

I saw you already fixed it :grinning:
Do you know approximately when the next release (1.6.2) will be available?

Thank you very much!
Eli.

Hi @Eli_gotesman it should be released in the next couple of days as there is a release scheduled but it needs to go through QE testing first.

Hi @Eli_gotesman just a heads up that we’ve just released v1.6.2 which has the fix in :slight_smile:

Thank you very much @chvck, I am already using the new release :slight_smile: