Custom marshalling to reduce indexed document size