In general I would recommend not changing the server-side batching setting (which is the default 40 you mentioned), because what that controls is essentially how many documents need to be processed by Typesense in a single go, before it switched back to processing search requests.
So the larger the server-side batch size, the lesser priority your search requests get