Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9996

Unstored PointFields return types are wrong

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Seems like unstored PointFields return Long types, ignoring the actual type.

      1. SOLR-9996.patch
        2 kB
        Ishan Chattopadhyaya
      2. SOLR-9996.patch
        2 kB
        Ishan Chattopadhyaya
      3. SOLR-9996.patch
        2 kB
        Ishan Chattopadhyaya

        Issue Links

          Activity

          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment -

          Here's a patch demonstrating the problem for PointInt field, along with the potential fix. Tomás Fernández Löbbe, please review.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - Here's a patch demonstrating the problem for PointInt field, along with the potential fix. Tomás Fernández Löbbe , please review.
          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment -

          Seems like only the IntPointField was affected. Added a similar test for the rest of the types nevertheless.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - Seems like only the IntPointField was affected. Added a similar test for the rest of the types nevertheless.
          Hide
          tomasflobbe Tomás Fernández Löbbe added a comment -

          Interesting, I'm wondering why this is not caught by testIntPointFieldReturn()

          Show
          tomasflobbe Tomás Fernández Löbbe added a comment - Interesting, I'm wondering why this is not caught by testIntPointFieldReturn()
          Hide
          tomasflobbe Tomás Fernández Löbbe added a comment -

          Maybe this is because of the realtime get?

          Show
          tomasflobbe Tomás Fernández Löbbe added a comment - Maybe this is because of the realtime get?
          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment -

          Now that I look at that test (not an in-depth look, though), I can't understand why it was not caught there.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - Now that I look at that test (not an in-depth look, though), I can't understand why it was not caught there.
          Hide
          tomasflobbe Tomás Fernández Löbbe added a comment -

          Yes, I'm pretty sure this is related to the realtime get, if I modify the test like

                ...
                assertU(adoc(sdoc("id", String.valueOf(++i), "field_p_i_dv_ns", "666")));
                assertU(commit());
                assertQ(req("qt", "/get", "id", String.valueOf(i))
                    , "count(//doc)=1", "//doc/str[@name='id'][.='"+i+"']"
                    , "//doc/int[@name='field_p_i_dv_ns'][.='666']");
                ...
          

          the test passes without the change on IntPoint. I still think the fix makes sense, but lets update the test to be a "realtime get" test?

          Show
          tomasflobbe Tomás Fernández Löbbe added a comment - Yes, I'm pretty sure this is related to the realtime get, if I modify the test like ... assertU(adoc(sdoc( "id" , String .valueOf(++i), "field_p_i_dv_ns" , "666" ))); assertU(commit()); assertQ(req( "qt" , "/get" , "id" , String .valueOf(i)) , "count( //doc)=1" , "//doc/str[@name='id'][.='" +i+ "']" , " //doc/ int [@name='field_p_i_dv_ns'][.='666']" ); ... the test passes without the change on IntPoint. I still think the fix makes sense, but lets update the test to be a "realtime get" test?
          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment - - edited

          lets update the test to be a "realtime get" test

          +1.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - - edited lets update the test to be a "realtime get" test +1.
          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment -

          New patch, modifying the existing test (instead of adding a new one) to use RTG.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - New patch, modifying the existing test (instead of adding a new one) to use RTG.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 69055aa4a82d144dc04bf10547912ccc4a7011df in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=69055aa ]

          SOLR-9996: Unstored IntPointField returns Long type

          Show
          jira-bot ASF subversion and git services added a comment - Commit 69055aa4a82d144dc04bf10547912ccc4a7011df in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=69055aa ] SOLR-9996 : Unstored IntPointField returns Long type
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 864bed2e49f1b32602e55a4e902519b7afc7d825 in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=864bed2 ]

          SOLR-9996: Ignore the RTG calls for tests where UpdateLog is disabled

          Show
          jira-bot ASF subversion and git services added a comment - Commit 864bed2e49f1b32602e55a4e902519b7afc7d825 in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=864bed2 ] SOLR-9996 : Ignore the RTG calls for tests where UpdateLog is disabled
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 69055aa4a82d144dc04bf10547912ccc4a7011df in lucene-solr's branch refs/heads/apiv2 from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=69055aa ]

          SOLR-9996: Unstored IntPointField returns Long type

          Show
          jira-bot ASF subversion and git services added a comment - Commit 69055aa4a82d144dc04bf10547912ccc4a7011df in lucene-solr's branch refs/heads/apiv2 from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=69055aa ] SOLR-9996 : Unstored IntPointField returns Long type
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 864bed2e49f1b32602e55a4e902519b7afc7d825 in lucene-solr's branch refs/heads/apiv2 from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=864bed2 ]

          SOLR-9996: Ignore the RTG calls for tests where UpdateLog is disabled

          Show
          jira-bot ASF subversion and git services added a comment - Commit 864bed2e49f1b32602e55a4e902519b7afc7d825 in lucene-solr's branch refs/heads/apiv2 from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=864bed2 ] SOLR-9996 : Ignore the RTG calls for tests where UpdateLog is disabled
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8a7594d180d8f3d23c7ccff5864e59ef961d137a in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8a7594d ]

          SOLR-9996: Unstored IntPointField returns Long type

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8a7594d180d8f3d23c7ccff5864e59ef961d137a in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8a7594d ] SOLR-9996 : Unstored IntPointField returns Long type
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit a5ccebc838f6b8cb4524b6fe92cfd00aa12e89ce in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a5ccebc ]

          SOLR-9996: Ignore the RTG calls for tests where UpdateLog is disabled

          Show
          jira-bot ASF subversion and git services added a comment - Commit a5ccebc838f6b8cb4524b6fe92cfd00aa12e89ce in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=a5ccebc ] SOLR-9996 : Ignore the RTG calls for tests where UpdateLog is disabled
          Hide
          tomasflobbe Tomás Fernández Löbbe added a comment -

          Backported the fix. Resolving

          Show
          tomasflobbe Tomás Fernández Löbbe added a comment - Backported the fix. Resolving

            People

            • Assignee:
              ichattopadhyaya Ishan Chattopadhyaya
              Reporter:
              ichattopadhyaya Ishan Chattopadhyaya
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development