lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject Re: dataDir config
Date Tue, 14 Jul 2015 22:05:56 GMT
Thank you Erick and Shawn.

I needed to separate the data from the Solr application so that Solr can be
uninstalled / reinstalled / upgraded without impact on the data or the
configuration of the core.  I did some more research and found it here:
https://cwiki.apache.org/confluence/display/solr/Solr+Start+Script+Reference
 The "-s" parameter will let me tell Solr where my index should be
created.  This works great and I will use it unless if someone tells me "no
way, here is why".

Steve

On Tue, Jul 14, 2015 at 4:18 PM, Erick Erickson <erickerickson@gmail.com>
wrote:

> I'd ask a different question, "why do you want to
> change the data dir in the first place?"...
>
> Just askin' since it's possible you started down
> this path without really needing to. Why isn't the
> default place, a "data" directory under each core
> adequate?
>
> Best,
> Erick
>
> On Tue, Jul 14, 2015 at 1:13 PM, Shawn Heisey <apache@elyograg.org> wrote:
> > On 7/14/2015 12:55 PM, Steven White wrote:
> >> Help me understand this.  Are you saying this is
> >> https://wiki.apache.org/solr/SolrConfigXml#System_property_substitution
> how
> >> we should specify the "dataDir"?
> >
> > That wiki page shows what I think is a horrible example.  It would be
> > completely unworkable if there's more than one core, because the value
> > of solr.data.dir is "/data/dir" which is an absolute path.  With that
> > setting, if that dataDir element were present in all the solrconfig.xml
> > files, it would force all the cores to try and use the same absolute
> > dataDir.  That would be a complete disaster.
> >
> >
> >> In that link, there is the statement "substituted can be put into a
> >> properties file" but it is not clear what this "properties file" is.
> Is it
> >> "solrcore.properties"?  If so, where is that file and where should it be
> >> (assuming I must create it).  Also, I looked at
> >> https://cwiki.apache.org/confluence/display/solr/Format+of+solr.xml
> and I
> >> cannot find an example of "dataDir".
> >
> > The URL you have included is a link to the Solr reference guide for the
> > next version of Solr (5.3 as of right now).  You can't find dataDir in
> > relation to solr.xml because the new format of solr.xml (which is the
> > only format supported by Solr 5.x) doesn't specify cores.  Only the OLD
> > solr.xml format, which Solr 4.10.x and earlier can use, lets you specify
> > dataDir.  I strongly recommend using the new format.  Here's some
> > documentation on the older format:
> >
> > https://wiki.apache.org/solr/Solr.xml%20%28supported%20through%204.x%29
> >
> >> I also found this:
> >> https://wiki.apache.org/solr/Solr.xml%204.4%20and%20beyond but this
> link,
> >> while it talks about "dataDir" it does not show an example of how to
> >> specify it in solr.xml file.
> >>
> >> In my case, I'm on 5.2.1 a none cloud setup (just 1 core).  I.e.: my
> setup
> >> is very similar to "\solr-5.2.1\example\example-DIH\solr".
> >
> > I am talking about specifying dataDir in the core.properties file, not
> > putting solr.data.dir in the solrcore.properties file.  I actually have
> > never used solrcore.properties, so I really don't know where it goes.
> > Here is a snippet where I am sitting in my solr home and display one of
> > my core.properties files:
> >
> > root@idxb3:/index/solr4# cat ./cores/s0_0/core.properties
> > #Written by CorePropertiesLocator
> > #Sat May 02 16:11:54 MDT 2015
> > name=s0build
> > dataDir=../../data/s0_0
> > loadonStartup=false
> > transient=false
> >
> > Once you understand how everything fits together, and you know that my
> > solr home is /index/solr4, you will be able to see all the following
> > info in what I pasted above:  This core's instanceDir is
> > /index/solr4/cores/s0_0.  The name of the core is s0build.  Its dataDir
> > (which in the properties file is a relative path -- relative to
> > instanceDir)is /index/solr4/data/s0_0.
> >
> > Here's another core.properties file.  This core is named s0live, and
> > uses s0_1 in all the places where the previous file had s0_0:
> >
> > root@idxb3:/index/solr4# cat ./cores/s0_1/core.properties
> > #Written by CorePropertiesLocator
> > #Sat May 02 16:11:54 MDT 2015
> > name=s0live
> > dataDir=../../data/s0_1
> > loadonStartup=false
> > transient=false
> >
> > I hope you can make sense out of all this information.
> >
> > Thanks,
> > Shawn
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message