split up toJSON into two steps
first .serialize() serializes into a plain js-object containing:
  querytime: time to query the index
  documents: the documents retrieved by the query containing
     score: the score calculated by lucene
     data: the data stored for the document within the index
then .toJSON() calls .serialize() and stringifys it to a JSON literal