On Sat, Jul 21, 2012 at 8:15 AM, Robert Muir <[email protected]> wrote: > I committed fixes for this, but things we should do: > > 1. Add checks to TestPostingsFormat that payloads work correctly when > scanning over deleted documents, and change the values in the returned > BytesRef itself from getPayload (bytes/offset/length) to ensure > callers actually set all 3 of these in getPayload.
OK I confirmed (after some silly fixes) TestPostingsFormat would have caught this bug (separately it also caught a reuse bug in SimpleText) ... so we'll have that coverage once we merge back to trunk. > 2. we should probably also document in DocumentsAndPositionsEnum that > you should not change the actual *bytes* pointed to by the payloads > bytesref (unless we want to add arraycopies in these PFs that return > slices of some inner datastructure). I committed a fix to D&PEnum.getPayload stating this. Thanks Robert! Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
