store JSON on secondary before indexing