Lucene - Core
  1. Lucene - Core
  2. LUCENE-4830

Sorter API: use an abstract doc map instead of an array

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The sorter API uses arrays to store the old->new and new->old doc IDs mappings. It should rather be an abstract class given that in some cases an array is not required at all (reverse mapping for example).

      1. LUCENE-4830.patch
        24 kB
        Adrien Grand

        Issue Links

          Activity

          Hide
          Adrien Grand added a comment -

          Patch. I also changed SortingAtomicReader.liveDocs() to be a view over the original liveDocs.

          Show
          Adrien Grand added a comment - Patch. I also changed SortingAtomicReader.liveDocs() to be a view over the original liveDocs.
          Hide
          Shai Erera added a comment -

          Looks good! I spotted missing @Override in REVERSE_SORTER DocMap and I think that we should make the DocMap impl final? Maybe it will encourage JIT ...
          +1!

          Show
          Shai Erera added a comment - Looks good! I spotted missing @Override in REVERSE_SORTER DocMap and I think that we should make the DocMap impl final? Maybe it will encourage JIT ... +1!
          Hide
          Adrien Grand added a comment -

          I think that we should make the DocMap impl final? Maybe it will encourage JIT ...

          Looks like it doesn't help much? http://stackoverflow.com/questions/8354412/do-java-finals-help-the-compiler-create-more-efficient-bytecode

          Show
          Adrien Grand added a comment - I think that we should make the DocMap impl final? Maybe it will encourage JIT ... Looks like it doesn't help much? http://stackoverflow.com/questions/8354412/do-java-finals-help-the-compiler-create-more-efficient-bytecode
          Hide
          Shai Erera added a comment -

          I see. Good to know!

          I think you can commit it.

          Show
          Shai Erera added a comment - I see. Good to know! I think you can commit it.
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Adrien Grand
          http://svn.apache.org/viewvc?view=revision&revision=1456787

          LUCENE-4830: Sorter API: Make the doc ID mapping an abstract class.

          Show
          Commit Tag Bot added a comment - [trunk commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1456787 LUCENE-4830 : Sorter API: Make the doc ID mapping an abstract class.
          Hide
          Commit Tag Bot added a comment -

          [branch_4x commit] Adrien Grand
          http://svn.apache.org/viewvc?view=revision&revision=1456789

          LUCENE-4830: Sorter API: Make the doc ID mapping an abstract class (merged from r1456787).

          Show
          Commit Tag Bot added a comment - [branch_4x commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1456789 LUCENE-4830 : Sorter API: Make the doc ID mapping an abstract class (merged from r1456787).
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Adrien Grand
          http://svn.apache.org/viewvc?view=revision&revision=1456796

          LUCENE-4830: Add missing @Override.

          Show
          Commit Tag Bot added a comment - [trunk commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1456796 LUCENE-4830 : Add missing @Override.
          Hide
          Adrien Grand added a comment -

          Thank you for the review, Shai!

          Show
          Adrien Grand added a comment - Thank you for the review, Shai!
          Hide
          Commit Tag Bot added a comment -

          [branch_4x commit] Adrien Grand
          http://svn.apache.org/viewvc?view=revision&revision=1456797

          LUCENE-4830: Add missing @Override (merged from r1456796).

          Show
          Commit Tag Bot added a comment - [branch_4x commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1456797 LUCENE-4830 : Add missing @Override (merged from r1456796).
          Hide
          Uwe Schindler added a comment -

          Closed after release.

          Show
          Uwe Schindler added a comment - Closed after release.

            People

            • Assignee:
              Adrien Grand
              Reporter:
              Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development