Hi,
I’m encountering the error TooManyClauses[maxClauseCount is set to 1024] while using FTS. Is there a way to fix this or a workaround? Attached is a sample image of the exception. I’m using java SDK.
Hi,
I’m encountering the error TooManyClauses[maxClauseCount is set to 1024] while using FTS. Is there a way to fix this or a workaround? Attached is a sample image of the exception. I’m using java SDK.
This error message is seen whenever your query matches more than 1024 clauses, typically with a regexp/wildcard/fuzzy or even with a very large disjunction.
To limit the memory consumption for a query, we placed the limit: maxClauseCount.
With couchbase server 6.5 onwards this setting is configurable, here’s how you can do it …
curl -XPUT -H "Content-type:application/json" \
http://<username>:<password>@<ip>:8094/api/managerOptions \
-d '{"bleveMaxClauseCount": "10000"}'
Is there way to get the current value of the bleveMaxClauseCount?
The following should give you current values
curl http://<username>:<password>@<ip>:8094/api/managerOptions
With Couchbase 7.1.0 this returns:
{"error":"Method not allowed for endpoint","status":"fail"}
Verbose curl output:
curl -v http://Administrator:password@localhost:8094/api/managerOptions
* Trying 127.0.0.1:8094...
* Connected to localhost (127.0.0.1) port 8094 (#0)
* Server auth using Basic with user 'Administrator'
> GET /api/managerOptions HTTP/1.1
> Host: localhost:8094
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Allow: OPTIONS, PUT
< Content-Type: application/json
< X-Content-Type-Options: nosniff
< Date: Fri, 08 Jul 2022 19:02:47 GMT
< Content-Length: 60
<
{"error":"Method not allowed for endpoint","status":"fail"}
* Connection #0 to host localhost left intact
You can run a GET against this endpoint -
curl -u <username>:<password> http://<ip>:8094/api/conciseOptions
This will give you a minimal set of manager options that our UI uses.
p.s. This was introduced in builds 6.6+ (if I’m remembering correctly).
Optionally, you can hit this endpoint, and the setting you’re looking for should be available within the options
sub object.
curl -u <username>:<password> http://<ip>:8094/api/manager