Details

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

      Description

      LUCENE-5271 introduced a table in order to get approximate values of the diameter of the earth given a latitude. This could be useful for other computations so I think it would be nice to have a method that exposes this table.

        Activity

        Hide
        Adrien Grand added a comment -

        Here is a patch.

        Show
        Adrien Grand added a comment - Here is a patch.
        Hide
        Robert Muir added a comment -

        Is there a reason to go from radius to diameter (i don't even know whats happening here, just curious).

        Maybe Gilad Barkai or Ryan Ernst can review better.

        Show
        Robert Muir added a comment - Is there a reason to go from radius to diameter (i don't even know whats happening here, just curious). Maybe Gilad Barkai or Ryan Ernst can review better.
        Hide
        Robert Muir added a comment -

        or maybe the cause of my confusion is the local was named badly before?

        Show
        Robert Muir added a comment - or maybe the cause of my confusion is the local was named badly before?
        Hide
        Adrien Grand added a comment -

        Right I forgot to mention that. I changed the variable name from radius to diameter because it looked to me like it actually was a diameter.

        Show
        Adrien Grand added a comment - Right I forgot to mention that. I changed the variable name from radius to diameter because it looked to me like it actually was a diameter.
        Hide
        Ryan Ernst added a comment -

        +1, patch looks good.

        maybe the cause of my confusion is the local was named badly before?

        I had asked for the 2*radius in the computation to be moved into the table in LUCENE-5271, and the table was renamed, but the variable was missed and I didn't notice it.

        Show
        Ryan Ernst added a comment - +1, patch looks good. maybe the cause of my confusion is the local was named badly before? I had asked for the 2*radius in the computation to be moved into the table in LUCENE-5271 , and the table was renamed, but the variable was missed and I didn't notice it.
        Hide
        Adrien Grand added a comment -

        Thanks Ryan. I plan to commit to the 4.7 branch as well if there is no objection (since we need to respin).

        Show
        Adrien Grand added a comment - Thanks Ryan. I plan to commit to the 4.7 branch as well if there is no objection (since we need to respin).
        Hide
        ASF subversion and git services added a comment -

        Commit 1569835 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1569835 ]

        LUCENE-5457: Expose SloppyMath earth diameter table

        Show
        ASF subversion and git services added a comment - Commit 1569835 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1569835 ] LUCENE-5457 : Expose SloppyMath earth diameter table
        Hide
        ASF subversion and git services added a comment -

        Commit 1569839 from Adrien Grand in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1569839 ]

        LUCENE-5457: Expose SloppyMath earth diameter table

        Show
        ASF subversion and git services added a comment - Commit 1569839 from Adrien Grand in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1569839 ] LUCENE-5457 : Expose SloppyMath earth diameter table
        Hide
        ASF subversion and git services added a comment -

        Commit 1569847 from Adrien Grand in branch 'dev/branches/lucene_solr_4_7'
        [ https://svn.apache.org/r1569847 ]

        LUCENE-5457: Expose SloppyMath earth diameter table

        Show
        ASF subversion and git services added a comment - Commit 1569847 from Adrien Grand in branch 'dev/branches/lucene_solr_4_7' [ https://svn.apache.org/r1569847 ] LUCENE-5457 : Expose SloppyMath earth diameter table
        Hide
        Gilad Barkai added a comment -

        +1
        Sorry for the confusion, indeed it should be diameter as the multiplication (*2) was moved to the pre-computed table, hence saving the operation in runtime as per Ryan's comment.

        Show
        Gilad Barkai added a comment - +1 Sorry for the confusion, indeed it should be diameter as the multiplication (*2) was moved to the pre-computed table, hence saving the operation in runtime as per Ryan's comment.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development