Description
In serverless mode, metering of write units is done by accounting the scorch index stat "num_bytes_indexed_after_analysis". This stat currently includes the sum of length of each token in tokenFrequenciesMap for each field in a document to be indexed. However, based on the type mappings, a user can enable stored fields, term vectors, docvalues options which would be stored in the index file. So, enabling these options would lead to more bytes getting written to the disk and as such these parts may need to be metered as well.
https://github.com/blevesearch/bleve/pull/1710
https://github.com/blevesearch/scorch_segment_api/pull/17
https://github.com/blevesearch/zapx/pull/119
https://github.com/blevesearch/zapx/pull/125
https://review.couchbase.org/c/cbft/+/177541