TooManyClauses[maxClauseCount is set to 1024]

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"}'

Thanks @abhinav! I’ll try your suggestion.