diff --git a/src/query.cc b/src/query.cc index dd9bc4d0..9f5322a8 100644 --- a/src/query.cc +++ b/src/query.cc @@ -728,7 +728,7 @@ void IndexUpdate::Merge(IndexUpdate&& update) { std::string IndexUpdate::ToString() { rapidjson::StringBuffer output; - rapidjson::Writer writer; + rapidjson::Writer writer(output); JsonWriter json_writer(&writer); IndexUpdate& update = *this; Reflect(json_writer, update);