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?
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.
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”}
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 - Loading....