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

DocValues: deref/sorted bytes types shouldn't return empty byte[] when doc didn't have a value

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 4.0-ALPHA
    • None
    • None
    • New

    Description

      I'm looking at making a FieldComparator that uses DV's SortedSource to
      sort by string field (ie just like TermOrdValComparator, except using
      DV instead of FieldCache). We already have comparators for DV int and
      float DV fields.

      But one thing I noticed is we can't detect documents that didn't have
      any value indexed vs documents that had empty byte[] indexed.

      This is easy to fix (and we used to do this), because these types are
      deref'd (ie, each doc stores an address, and then separately looks up
      the byte[] at that address), we can reserve ord/address 0 to mean "doc
      didn't have the field". Then we should return null when you retrieve
      the BytesRef value for that field.

      Attachments

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: