Query serialisation uses om_tostring() in places where encode_length() might be more appropriate
|Reported by:||Richard Boulton||Owned by:||Richard Boulton|
The query serialisation code in in api/omqueryinternal.cc (function Xapian::Query::Internal::serialise), uses om_tostring() to encode the term position and wqf of a leaf query, and also in various places where integer and float parameters are serialised.
It would probably be better to use encode_length() for the integer values, and serialise_double() for the floating values (ie, produce a more compact representation and/or use less CPU to pack/unpack).
The query representation already contains various encode_length() values, so it's not currently human readable, so I don't think there's a downside to doing this.
Marking for milestone 1.1.0 for now, since this would be a fairly minor change, but would break remote protocol compatibility, so now would be a good time to do it.