You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Kay Kay (JIRA)" <ji...@apache.org> on 2008/12/15 20:39:44 UTC

[jira] Created: (SOLR-916) CoreContainer :: egister(String, SolrCore, boolean) documentation clarification about returnPrev argument

CoreContainer :: egister(String, SolrCore, boolean)  documentation clarification about returnPrev argument
----------------------------------------------------------------------------------------------------------

                 Key: SOLR-916
                 URL: https://issues.apache.org/jira/browse/SOLR-916
             Project: Solr
          Issue Type: Improvement
          Components: documentation
    Affects Versions: 1.3
         Environment: Tomcat 6, JRE 6 
            Reporter: Kay Kay
            Priority: Minor
             Fix For: 1.3.1


In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
   *it would return a previous core having the same name if it existed *and returnPrev = true*.

  * @return a previous core having the same name if it existed and returnPrev==true
  */
 public SolrCore register(String name, SolrCore core, boolean returnPrev) ..


But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.

Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Attachment:     (was: SOLR-916.patch)

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725927#action_12725927 ] 

Noble Paul edited comment on SOLR-916 at 6/30/09 10:25 PM:
-----------------------------------------------------------

the parameter is renamed . I hope it is fine now
committed r790041

      was (Author: noble.paul):
    committed r790041
  
> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Assignee: Noble Paul
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Attachment: SOLR-916.patch

Patch attached . More documentation added for the arguments.  Instead of RuntimeException - IllegalArgumentException is thrown to be more specific about the error. (backward compatible since IRE inherits from RTE too). 

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.3.1
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Attachment:     (was: SOLR-916.patch)

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay commented on SOLR-916:
------------------------------

 I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue 

I disagree. The name of the variable does not reflect the actual underlying behavior .  We need the documentation change as well as an appropriate name of the variable fitting the current behavior. 


> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711599#action_12711599 ] 

Mark Miller commented on SOLR-916:
----------------------------------

I would say that if returnPrev is false, what is returned is undefined. The closed core is returned, but it just as well could be null. If the user expects to get and be able to use the prevCore, he must pass returnPrev = true.

It still makes sense to me, but I wouldn't object to the change if someone wants to put it in.

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Noble Paul reassigned SOLR-916:
-------------------------------

    Assignee: Noble Paul

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Assignee: Noble Paul
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay edited comment on SOLR-916 at 6/30/09 8:04 AM:
-------------------------------------------------------

"I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue"

I disagree. The name of the variable does not reflect the actual underlying behavior .  We need the documentation change as well as an appropriate name of the variable fitting the current behavior. 


      was (Author: kaykay.unique):
     I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue 

I disagree. The name of the variable does not reflect the actual underlying behavior .  We need the documentation change as well as an appropriate name of the variable fitting the current behavior. 

  
> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay commented on SOLR-916:
------------------------------

| I could go either way. The name change certainly makes some sense, but even as is, a core that is returned closed is not very useful. Null could just as well be returned. But when you ask to returnPrev, a working open core is guaranteed to be returned if a previous one existed. I wouldnt feel so bad leaving it as it is - your change almost seems to strengthen the contract - you have to return the closed core as well. Neither side is a very strong argument to me and I could go either way.

I do not have an issue with the logic ( closing an existing core if returnPrev is false ) as it is currently but am more concerned with the name of the variable and the documentation about the same - just to make sure that it is in sync with the actual logic as of today. 

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725533#action_12725533 ] 

Noble Paul commented on SOLR-916:
---------------------------------

I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Attachment: SOLR-916.patch

appropriate rename of closePrevious to donotClosePrevious . 

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch, SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Description: 
In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
  it would return a previous core having the same name if it existed *and returnPrev = true*.

  * @return a previous core having the same name if it existed and returnPrev==true
  */
 public SolrCore register(String name, SolrCore core, boolean returnPrev) ..


But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.

Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.


  was:
In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
   *it would return a previous core having the same name if it existed *and returnPrev = true*.

  * @return a previous core having the same name if it existed and returnPrev==true
  */
 public SolrCore register(String name, SolrCore core, boolean returnPrev) ..


But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.

Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.



> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.3.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Component/s:     (was: documentation)

Renaming the 3rd field to be closeprevious and fixing documentation to reflect the code appropriately. 

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Summary: CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument  (was: CoreContainer :: egister(String, SolrCore, boolean)  documentation clarification about returnPrev argument)

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.3.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>    *it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Noble Paul resolved SOLR-916.
-----------------------------

    Resolution: Fixed

committed r790041

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Assignee: Noble Paul
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703631#action_12703631 ] 

Mark Miller commented on SOLR-916:
----------------------------------

I could go either way. The name change certainly makes some sense, but even as is, a core that is returned closed is not very useful. Null could just as well be returned. But when you ask to returnPrev, a working open core is guaranteed to be returned if a previous one existed. I wouldnt feel so bad leaving it as it is - your change almost seems to strengthen the contract - you have to return the closed core as well. Neither side is a very strong argument to me and I could go either way.

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Fix Version/s:     (was: 1.3.1)
                   1.4

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay commented on SOLR-916:
------------------------------

Can somebody familiar with this part - confirm / add more light on what the third argument supposedly  is intended to do (as compared to what it is doing today ).

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay updated SOLR-916:
-------------------------

    Attachment: SOLR-916.patch

returnPrevious boolean renamed to closePrevious. 

Javadoc modified to reflect exactly what is happening in the code. 

> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

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

Kay Kay edited comment on SOLR-916 at 6/30/09 8:04 AM:
-------------------------------------------------------

 | I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue

I disagree. The name of the variable does not reflect the actual underlying behavior .  We need the documentation change as well as an appropriate name of the variable fitting the current behavior. 


      was (Author: kaykay.unique):
    "I guess we can just document the behavior and keep the variable name as is. If it is ok I shall just make the changes and close this issue"

I disagree. The name of the variable does not reflect the actual underlying behavior .  We need the documentation change as well as an appropriate name of the variable fitting the current behavior. 

  
> CoreContainer :: register(String, SolrCore, boolean)  documentation clarification about returnPrev argument
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-916
>                 URL: https://issues.apache.org/jira/browse/SOLR-916
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>         Environment: Tomcat 6, JRE 6 
>            Reporter: Kay Kay
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-916.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> In CoreContainer.java :: register(name, core, returnPrev) - the documentation says 
>   it would return a previous core having the same name if it existed *and returnPrev = true*.
>   * @return a previous core having the same name if it existed and returnPrev==true
>   */
>  public SolrCore register(String name, SolrCore core, boolean returnPrev) ..
> But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed.
> Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.