Index files ./mainIndex/log.000000000000xx.data are filling my hard drive 100%

These log.xxxx files contain docIDs and indexed fields. You can create an index by specifying docid as folows: CREATE INDEX id_ix onbeer-sample(meta().id);

https://docs.couchbase.com/server/4.1/n1ql/n1ql-language-reference/metafun.html