I didn't notice that the mail was not sent to the list. Plz send all your communication to the mailing list
---------- Forwarded message ---------- From: Noble Paul നോബിള് नोब्ळ् <noble.p...@corp.aol.com> Date: 2009/5/8 Subject: Re: Solr MultiCore dataDir bug - a fix To: pasi.j.matilai...@tieto.com are you sure that your solrconfig.xml does not have a <dataDir> tag ? If it is there, then it is supposed to take precedence over the one you have put in solr.xml On Fri, May 8, 2009 at 10:43 AM, <pasi.j.matilai...@tieto.com> wrote: > Hello, > > I encountered yesterday the problem that MultiCore Solr doesn't handle > properly the dataDir setting in solr.xml, regardless of whether it's > specified as a nested property or as an attribute to core element. I found a > mail thread where you on March 4th, 2009 promised to have it fixed in a day > or two. > (http://markmail.org/message/oylfeldy53lebsfe#query:solr%20multicore%20datadir+page:1+mid:abfbhdxxt3r3zujs+state:results) > > Anyway, as the current Solr trunk didn't contain the fix, I hunted the bug > down myself. And as I don't want to take the time to get account to update > the patch to Solr SVN myself, I'm sending the fix to you instead. > > In current trunk, in SolrCore constructor, at line 491, there currently is: > > if (dataDir == null) > dataDir = config.get("dataDir",cd.getDataDir()); > > I replaced this with the following code: > > if (dataDir == null) { > if (cd.getDataDir()!=null) > dataDir = cd.getDataDir(); > else > dataDir = config.get("dataDir",cd.getDefaultDataDir()); > } > > I'm not sure this fully represents how this is supposed to work, but it > works anyway. At least when I specify dataDir as an attribute to core > element with a path relative to instanceDir: > > <!-- instanceDir resolves to solr/current/ and dataDir to > solr/current/data --> > <core name="current" instanceDir="current" dataDir="data" /> > > Best regards, > > Pasi J. Matilainen, Software Engineer > Tieto Finland Oy, R&D Services, Devices R&D > pasi.j.matilai...@tieto.com, mobile +358 (0)40 575 7738, fax +358 (0)14 618 > 566 > Visiting address: Mattilanniemi 6, 40101 JYVÄSKYLÄ, Mailing address: P.O. > Box 163, 40101 JYVÄSKYLÄ, Finland, www.tieto.com > > Meet the new Tieto: www.tieto.com/newtieto > Please note: The information contained in this message may be legally > privileged and confidential and protected from disclosure. If the reader of > this message is not the intended recipient, you are hereby notified that any > unauthorised use, distribution or copying of this communication is strictly > prohibited. If you have received this communication in error, please notify > us immediately by replying to the message and deleting it from your > computer. Thank You. > > > -- ----------------------------------------------------- Noble Paul | Principal Engineer| AOL | http://aol.com -- ----------------------------------------------------- Noble Paul | Principal Engineer| AOL | http://aol.com