You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ahmet Arslan (Created) (JIRA)" <ji...@apache.org> on 2012/01/30 09:45:10 UTC

[jira] [Created] (SOLR-3074) Bug in SolrPluginUtilsTest

Bug in SolrPluginUtilsTest
--------------------------

                 Key: SOLR-3074
                 URL: https://issues.apache.org/jira/browse/SOLR-3074
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 4.0
            Reporter: Ahmet Arslan
            Priority: Minor
             Fix For: 4.0


testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.

http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3074:
---------------------------

    Attachment: SOLR-3074.patch

additions to Ahmet's patch showing the additional problems found.

given that neither of these two methods are used anywhere in Solr, and they are so clearly broken i suggest we deprecate them in 3.6 as "completely broken" and remove in trunk.
                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-3074.
----------------------------

    Resolution: Fixed

r1303977 - trunk fix of SolrPluginUtils & test, removal of loadStoredFields method

r1304001 - backport to 3x, but leave loadStoredFields in place with a scary freaking deprecation warning.

Ahmet: thanks for your report and especially for your test case
                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Ryan McKinley (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234814#comment-13234814 ] 

Ryan McKinley commented on SOLR-3074:
-------------------------------------

bq. remove these methods in trunk

+1


I *think* this was used long ago before the javabin format took over serializing DocList 
                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3074:
---------------------------

    Summary: SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken  (was: Bug in SolrPluginUtilsTest)

Ahmet: thanks for raising this issue, and for your patch.

you didn't mention it in jira, but in your linked email you suggested that the method being tested (docListToSolrDocumentList) isn't actually doing what it's suppose to...

{quote}
Regardless of Set<String> fields parameter, SolrPluginUtils#docListToSolrDocumentList method loads all of the stored fields. Shouldn't it just load the fields given in the set? Should I file a jira ticket?
{quote}

Digging deeper, i found two problems...
* docListToSolrDocumentList is delegating the field list to SolrIndexSearcher.doc, which means those fields are read immediately, but the rest of the fields will be lazy loaded
* docListToSolrDocumentList is calling DocumentBuilder.loadStoredFields which loads all of the fields -- regardless of which field list was passed to docListToSolrDocumentList
* docListToSolrDocumentList has some really bizare code in it, preventing stored fields from being returned if they are the result of a copyField.

Since there are no other usages of DocumentBuilder.loadStoredFields in Solr, it's not clear to me what the intended point of it's crazy logic was

                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.0
>            Reporter: Ahmet Arslan
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3074:
---------------------------

    Affects Version/s:     (was: 4.0)
                       3.5
        Fix Version/s: 3.6
    
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3074:
---------------------------

    Attachment: SOLR-3074.patch

Oy...

so i started down the road of removing all this from trunk, and then realized i somehow overlooked the fact that clustering is using docListToSolrDocumentList

so then i started trying to fix clustering to have the logic it needed, and then realized that the code i wound up with actually implemented the documented contract of docListToSolrDocumentList in a way that made the new tests in this issue pass.

So this new patch:
* fixes docListToSolrDocumentList
* fixes the test for docListToSolrDocumentList
* removes DocumentBuilder.loadStoredFields

my _new_ plan is to commit as is to trunk, and backport all but the DocumentBuilder.java changes to 3x (i'll just deprecate loadStoredFields in 3x)

comments?
                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-3074) Bug in SolrPluginUtilsTest

Posted by "Ahmet Arslan (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ahmet Arslan updated SOLR-3074:
-------------------------------

    Attachment: SOLR-3074.patch
    
> Bug in SolrPluginUtilsTest
> --------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.0
>            Reporter: Ahmet Arslan
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Assigned] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reassigned SOLR-3074:
------------------------------

    Assignee: Ahmet Arslan  (was: Hoss Man)
    
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Assignee: Ahmet Arslan
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Assigned] (SOLR-3074) SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken

Posted by "Hoss Man (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reassigned SOLR-3074:
------------------------------

    Assignee: Hoss Man

barring objections i'm going to...

* remove these methods in trunk
* mark then "@deprecated apparently  this method has behaved as documented for a very long time, and is unneeded in Solr, so it is deprecated and will be removed in Solr 4" in 3x

...tomorrow.
                
> SolrPluginUtils.docListToSolrDocumentList is broken, existing test is also broken
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-3074
>                 URL: https://issues.apache.org/jira/browse/SOLR-3074
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.5
>            Reporter: Ahmet Arslan
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-3074.patch, SOLR-3074.patch
>
>
> testDocListConversion() is not testing what it's suppossed to test. Because added test documents are not committed.
> http://search-lucene.com/m/uwh9l2SHH4e

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org