JSON output for search in a multilingual website

I have a website that has multiple languages and I need it to generate an index file for every language separately.
Right now I’m doing that with grunt but I don’t want to keep using it for this task.
I have tried doing it but I don’t see any index,json files anywhere.
I guess the outputs are generated when not using the hugo server, but is it also possible to create the json output when running on it? I don’t want it to be generated only when “compiling” the site
The website is open source, you can check it out here

Thank you.

Sounds like a job for: https://gohugo.io/templates/output-formats#readout