Lucene - Core
  1. Lucene - Core
  2. LUCENE-4228

Refactor CharFilter to be a java.io.FilterReader

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0-BETA, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Was looking at my old patch for LUCENE-2788, which isn't going to be easy,
      but besides that we can separately break out a nice refactoring to simplify the CharFilter logic.

      I think this would be a good idea for 4.0, since it gives us less API surface area.

      1. LUCENE-4228.patch
        108 kB
        Robert Muir

        Issue Links

          Activity

          Hide
          Michael McCandless added a comment -

          +1, great simplification. Nice to no longer need to do unexpected CharReader.get, no more CharStream. And nice that CharFilter is promoted to core.

          Show
          Michael McCandless added a comment - +1, great simplification. Nice to no longer need to do unexpected CharReader.get, no more CharStream. And nice that CharFilter is promoted to core.
          Hide
          Uwe Schindler added a comment -

          +1, great!The only problem I see is:

          • If one wraps a Reader with a CharFilter that corrects offsets and on top of that he wraps another custom FilterReader(not CharFilter), you loose offsets. But thats not bad, if somebody does this he should know what he does g
          Show
          Uwe Schindler added a comment - +1, great!The only problem I see is: If one wraps a Reader with a CharFilter that corrects offsets and on top of that he wraps another custom FilterReader(not CharFilter), you loose offsets. But thats not bad, if somebody does this he should know what he does g
          Hide
          Robert Muir added a comment -

          Yeah Uwe, thats true. But its also true today with CharReader

          Show
          Robert Muir added a comment - Yeah Uwe, thats true. But its also true today with CharReader
          Hide
          Robert Muir added a comment -

          Ill commit this one in a little bit: we can then iterate from here.

          Show
          Robert Muir added a comment - Ill commit this one in a little bit: we can then iterate from here.

            People

            • Assignee:
              Unassigned
              Reporter:
              Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development