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

NormalizeCharMap.build creates utf32-keyed automaton and uses it with utf16 keys

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0, 6.0
    • None
    • None
    • New

    Description

      NormalizeCharMap#build method is inconsistent with later use in MappingCharFilter

              final org.apache.lucene.util.fst.Builder<CharsRef> builder = new org.apache.lucene.util.fst.Builder<CharsRef>(FST.INPUT_TYPE.BYTE2, outputs);
              final IntsRef scratch = new IntsRef();
              for(Map.Entry<String,String> ent : pendingPairs.entrySet()) {
                builder.add(Util.toUTF32(ent.getKey(), scratch),
                            new CharsRef(ent.getValue()));
      

      (note BYTE2 vs. toUTF32 later on).

      Attachments

        1. LUCENE-4310.patch
          3 kB
          Michael McCandless
        2. LUCENE-4310.patch
          4 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            dweiss Dawid Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: