TopDocs* TopDocs_deserialize(TopDocs *self, InStream *instream) { self = self ? self : (TopDocs*)VTable_Make_Obj(&TOPDOCS); self->match_docs = VA_deserialize(NULL, instream); self->total_hits = InStream_Read_C32(instream); return self; }
PhraseQuery* PhraseQuery_deserialize(PhraseQuery *self, InStream *instream) { float boost = InStream_Read_F32(instream); CharBuf *field = CB_deserialize(NULL, instream); VArray *terms = VA_deserialize(NULL, instream); self = self ? self : (PhraseQuery*)VTable_Make_Obj(PHRASEQUERY); return S_do_init(self, field, terms, boost); }
MatchDoc* MatchDoc_deserialize(MatchDoc *self, InStream *instream) { self = self ? self : (MatchDoc*)VTable_Make_Obj(&MATCHDOC); self->doc_id = InStream_Read_C32(instream); self->score = InStream_Read_Float(instream); if (InStream_Read_U8(instream)) { self->values = VA_deserialize(NULL, instream); } return self; }