Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5864

Split BytesRef into BytesRef and BytesRefBuilder

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Follow-up of LUCENE-5836.

      The fact that BytesRef (and CharsRef, IntsRef, LongsRef) can be used as either pointers to a section of a byte[] or as buffers raises issues. The idea would be to keep BytesRef but remove all the buffer methods like copyBytes, grow, etc. and add a new class BytesRefBuilder that wraps a byte[] and a length (but no offset), has grow/copyBytes/copyChars methods and the ability to build BytesRef instances.

        Attachments

        1. LUCENE-5864.patch
          451 kB
          Adrien Grand
        2. LUCENE-5864.patch
          544 kB
          Adrien Grand
        3. LUCENE-5864.patch
          543 kB
          Adrien Grand

          Activity

            People

            • Assignee:
              jpountz Adrien Grand
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: