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

Allow StringField to take BytesRef value, to index a single binary token

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      5 years ago (LUCENE-1458) we "enabled" fully binary terms in the
      lowest levels of Lucene (the codec APIs) yet today, actually adding an
      arbitrary byte[] binary term during indexing is far from simple: you
      must make a custom Field with a custom TokenStream and a custom
      TermToBytesRefAttribute, as far as I know.

      This is supremely expert, I wonder if anyone out there has succeeded
      in doing so?

      I think we should make indexing a single byte[] as simple as indexing
      a single String.

      This is a pre-cursor for issues like LUCENE-5596 (encoding IPv6
      address as byte[16]) and LUCENE-5879 (encoding native numeric values
      in their simple binary form).

        Attachments

        1. LUCENE-5989.patch
          16 kB
          Michael McCandless
        2. LUCENE-5989.patch
          34 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: