Auto-Batching
Your plan caps how many Terms a single request may carry: the Max Terms per Operation limit, 5 on the Free plan (see Plans and Pricing). Auto-batching lets you call union, intersection and concat with more Terms than that and still get a single result back.
It is enabled by default and requires no configuration.
How it works
The first time a client needs them, it fetches your account limits from the API and caches them for its lifetime. When a call carries more Terms than maxTermsCount, the client:
- Splits the Term list into chunks that fit within the cap.
- Sends one request per chunk.
- Feeds the results back into further requests until a single Term remains.
This works because union, intersection and concat are associative: combining the results of the chunks gives the same language as combining every Term at once. Operations that take a fixed number of Terms, such as difference, equivalent and subset, are never batched.
Code
What it costs
Each request the client sends counts against your monthly quota and your rate limit, and the chunks are separate round trips. A union of 12 Terms on the Free plan therefore consumes several requests and takes correspondingly longer.
Disabling it
Turn auto-batching off at client construction if you would rather oversized calls failed explicitly, so that you control how they are split. Calls above the cap then raise TooManyTerms (see Error Handling).
Code
Auto-batching splits by Term count only. It does not split work that is heavy because a single Term is complex. For that, see Bounding Execution and Heavy Operations.