for calculating BM25 by myself, I need length of document and average document length on whole documents in collection. according to formula, length of a document is number of it's word. I search a lot, but no success to find a way to elastic return this values to me.
could you please give me a solution?