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 "Henri Biestro (JIRA)" <ji...@apache.org> on 2008/08/23 22:31:44 UTC

[jira] Created: (SOLR-719) Persisting solr.xml through SolrJ does not handle relative pathes correctly

Persisting solr.xml through SolrJ does not handle relative pathes correctly
---------------------------------------------------------------------------

                 Key: SOLR-719
                 URL: https://issues.apache.org/jira/browse/SOLR-719
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: Henri Biestro
            Priority: Trivial
             Fix For: 1.4


It seems the code in CoreContainer.persistFile should begin with:
{code}

  /** Persists the cores config file in a user provided file. */
  public void persistFile(File file) {
    if (file != null && !file.isAbsolute())
        file = new File(configFile.getParentFile(), file.getPath());
    log.info("Persisting cores config to " + (file==null ? configFile : file));
...
{code}

The issue today resides in calling file.getName() instead of file.getPath()

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


[jira] Updated: (SOLR-719) Persisting solr.xml through SolrJ does not handle relative pathes correctly

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

Henri Biestro updated SOLR-719:
-------------------------------

    Affects Version/s:     (was: 1.4)
                       1.3

> Persisting solr.xml through SolrJ does not handle relative pathes correctly
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-719
>                 URL: https://issues.apache.org/jira/browse/SOLR-719
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Henri Biestro
>            Priority: Trivial
>             Fix For: 1.4
>
>
> It seems the code in CoreContainer.persistFile should begin with:
> {code}
>   /** Persists the cores config file in a user provided file. */
>   public void persistFile(File file) {
>     if (file != null && !file.isAbsolute())
>         file = new File(configFile.getParentFile(), file.getPath());
>     log.info("Persisting cores config to " + (file==null ? configFile : file));
> ...
> {code}
> The issue today resides in calling file.getName() instead of file.getPath()

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


[jira] Resolved: (SOLR-719) Persisting solr.xml through SolrJ does not handle relative pathes correctly

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

Shalin Shekhar Mangar resolved SOLR-719.
----------------------------------------

    Resolution: Fixed

Committed revision 688427.

Thanks Henri!

> Persisting solr.xml through SolrJ does not handle relative pathes correctly
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-719
>                 URL: https://issues.apache.org/jira/browse/SOLR-719
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Henri Biestro
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-719.patch
>
>
> It seems the code in CoreContainer.persistFile should begin with:
> {code}
>   /** Persists the cores config file in a user provided file. */
>   public void persistFile(File file) {
>     if (file != null && !file.isAbsolute())
>         file = new File(configFile.getParentFile(), file.getPath());
>     log.info("Persisting cores config to " + (file==null ? configFile : file));
> ...
> {code}
> The issue today resides in calling file.getName() instead of file.getPath()

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


[jira] Updated: (SOLR-719) Persisting solr.xml through SolrJ does not handle relative pathes correctly

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

Shalin Shekhar Mangar updated SOLR-719:
---------------------------------------

    Attachment: SOLR-719.patch

This change in PERSIST case is enough
{code}
File file = new File(cores.getConfigFile().getParentFile(), fileName);
cores.persistFile(file);
{code}

Verified the location through the TestSolrProperties. I shall commit this shortly.

> Persisting solr.xml through SolrJ does not handle relative pathes correctly
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-719
>                 URL: https://issues.apache.org/jira/browse/SOLR-719
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Henri Biestro
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-719.patch
>
>
> It seems the code in CoreContainer.persistFile should begin with:
> {code}
>   /** Persists the cores config file in a user provided file. */
>   public void persistFile(File file) {
>     if (file != null && !file.isAbsolute())
>         file = new File(configFile.getParentFile(), file.getPath());
>     log.info("Persisting cores config to " + (file==null ? configFile : file));
> ...
> {code}
> The issue today resides in calling file.getName() instead of file.getPath()

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


[jira] Updated: (SOLR-719) Persisting solr.xml through SolrJ does not handle relative pathes correctly

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

Shalin Shekhar Mangar updated SOLR-719:
---------------------------------------

    Fix Version/s:     (was: 1.4)
                   1.3
         Assignee: Shalin Shekhar Mangar

> Persisting solr.xml through SolrJ does not handle relative pathes correctly
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-719
>                 URL: https://issues.apache.org/jira/browse/SOLR-719
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Henri Biestro
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>
> It seems the code in CoreContainer.persistFile should begin with:
> {code}
>   /** Persists the cores config file in a user provided file. */
>   public void persistFile(File file) {
>     if (file != null && !file.isAbsolute())
>         file = new File(configFile.getParentFile(), file.getPath());
>     log.info("Persisting cores config to " + (file==null ? configFile : file));
> ...
> {code}
> The issue today resides in calling file.getName() instead of file.getPath()

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