Added `doc_values` for memory efficient sorting and boosting (bug 1055271)

I know this is not yours, and I might be in the minority here, but for the record I don't like this helper and its friend below. I prefer keeping all the config as litteral dicts, I find it easier to read that way.