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

doShare is pointless in PositiveIntOutputs

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 6.0
    • Component/s: core/FSTs
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We recently use this in oal.core.fst.PositiveIntOutputs to indicate whether to share outputs. The comment mentioned 'with doShare=false, in some case this may result in a smaller FST'. However, this is not intuitive, as for long type, we always have the smallest output reduced to NO_OUTPUT, thus the smallest one is 'moved' towards root, and no extra output is created.

      However, if there are many many small outputs around root arcs, when we share outputs, a large output might be pushed into the root arcs. When root arcs are packed as fixed-array, yes the size of FST is increased. But, I suppose this should invoke other intuitive heuristics, instead of the confusing 'doShare'?

      Besides, this only exist in PositiveIntOutputs.

        Attachments

        1. LUCENE-5028.patch
          2 kB
          Han Jiang
        2. LUCENE-5028.patch
          23 kB
          Han Jiang
        3. LUCENE-5028.patch
          23 kB
          Han Jiang

          Activity

            People

            • Assignee:
              billy Han Jiang
              Reporter:
              billy Han Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: