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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: