You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Juha Haaga (JIRA)" <ji...@apache.org> on 2013/10/16 09:24:42 UTC

[jira] [Comment Edited] (SOLR-5350) Solr 4.5 upgrade instructions don't mention that solrconfig.xml dataDir variable must now be in another format.

    [ https://issues.apache.org/jira/browse/SOLR-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13796492#comment-13796492 ] 

Juha Haaga edited comment on SOLR-5350 at 10/16/13 7:23 AM:
------------------------------------------------------------

I went and searched through the example configs in all 4.* solr releases and they correctly say ${solr.core.data.dir:}. Digging through the changelog of our repository, it turns out that I had also used that in the initial commit, but one of our sysadmins while configuring a production install had changed it to ${dataDir} about a year ago. I'm not sure what was his reasoning to change it into that, or what was the original source of that syntax then, but apparently it worked. 

So basically the ${dataDir} style seems to have worked in all versions from 4.0.0-alpha until 4.4 to 4.5 migration, at which point Solr started enforcing the ${solr.core.data.dir:} variant. 

---- Snip from the solrconfig.xml that worked pre-4.5 ----
<config>
  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>

  <jmx />

  <!-- <indexConfig> section could go here, but we want the defaults -->

  <!--  The DirectoryFactory to use for indexes -->
  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>

  <dataDir>${dataDir}</dataDir>

  <!-- the default high-performance update handler -->
  <updateHandler class="solr.DirectUpdateHandler2">
    <updateLog>
      <str name="dir">${dataDir}</str>
    </updateLog>
    <maxPendingDeletes>100000</maxPendingDeletes>
    <autoCommit> 
      <maxDocs>10000</maxDocs>
      <maxTime>30000</maxTime> 
    </autoCommit>
  </updateHandler>
---- end snip ----




was (Author: fuu):
I went and searched through the example configs in all 4.* solr releases and they correctly say ${solr.core.data.dir:}. Digging through the changelog of our repository, it turns out that I had also used that in the initial commit, but one of our sysadmins while configuring a production install had changed it to ${dataDir} about a year ago. I'm not sure what was his reasoning to change it into that, or what was the original source of that syntax then, but apparently it worked. 

So basically the ${dataDir} style seems to have worked in all versions from 4.0.0-alpha until 4.4 to 4.5 migration, at which point Solr started enforcing the ${solr.core.data.dir} variant. 

---- Snip from the solrconfig.xml that worked pre-4.5 ----
<config>
  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>

  <jmx />

  <!-- <indexConfig> section could go here, but we want the defaults -->

  <!--  The DirectoryFactory to use for indexes -->
  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>

  <dataDir>${dataDir}</dataDir>

  <!-- the default high-performance update handler -->
  <updateHandler class="solr.DirectUpdateHandler2">
    <updateLog>
      <str name="dir">${dataDir}</str>
    </updateLog>
    <maxPendingDeletes>100000</maxPendingDeletes>
    <autoCommit> 
      <maxDocs>10000</maxDocs>
      <maxTime>30000</maxTime> 
    </autoCommit>
  </updateHandler>
---- end snip ----



> Solr 4.5 upgrade instructions don't mention that solrconfig.xml dataDir variable must now be in another format.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5350
>                 URL: https://issues.apache.org/jira/browse/SOLR-5350
>             Project: Solr
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 4.5
>         Environment: All
>            Reporter: Juha Haaga
>            Priority: Minor
>              Labels: documentation
>             Fix For: 4.5.1
>
>
> The configuration of dataDir in solrconfig.xml used to support ${dataDir} format at least in all the previous 4.* releases, but in 4.5 that is no longer true. Using the old format produces exception: 
> SolrException: No system property or default value specified for dataDir value:${dataDir}
> The new format for the variable is ${solr.corename.data.dir:} where corename is defined in solr.xml. This deprecation is not mentioned in the upgrade instructions.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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