You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Laxmilal Menaria <lm...@chambal.com> on 2008/10/23 11:07:46 UTC

How to change dataDir path in solrconfig xml

Hello,

I have created index of my xml files, these all index files are located in
data/index folder. Now  I have update the dataDir in  SolrConfig.xml to
data only, but I want to specify  data/index, so how can I do that, I have
multiple data folders and want to separate it,
index1, index2...

-- 
Thanks,
Laxmilal menaria

http://www.bucketexplorer.com/
http://www.sdbexplorer.com/
http://www.chambal.com/
http://www.minalyzer.com/

Re: How to change dataDir path in solrconfig xml

Posted by Laxmilal Menaria <lm...@chambal.com>.
Ok... Thanks

Re: How to change dataDir path in solrconfig xml

Posted by Chris Hostetter <ho...@fucit.org>.
: Solr does not directly read you xml files. It maintains a Lucene index

bsaed on Laxmilal's first post, it seems like he already built an index.  
His question seems very specificly about how to directly control the name 
of hte index directory -- because he wants to reuse the same data dir for 
multiple cores, but have a differnet "index" directory name for each core.

Laxmilal: Don't do that.

treat the dataDir as the lowest level of granularity you have over where 
Solr will store your index.  the fact that the index consists of a 
single directory named "index" in that dataDir is something you should be 
agnostic too.  

The "index" directory is the raw Lucene index, but other features in Solr 
also need to put other things in the data dir, and trying to reuse the 
same dataDir for multiple cores would cause collisions. Even if you don't 
use any of these features now, a future version of Solr might take 
advantage of the dataDir for other purposes and your installation would 
break on update because of hte collisions.


>> > I have created index of my xml files, these all index files are located
>> in
>> > data/index folder. Now  I have update the dataDir in  SolrConfig.xml to



-Hoss


Re: How to change dataDir path in solrconfig xml

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
Solr does not directly read you xml files. It maintains a Lucene index
in the ${DATA_DIR}/index directory.

So you do not have to change it. After you make your xml files post
them to solr to get it indexed

On Thu, Oct 23, 2008 at 6:23 PM, Laxmilal Menaria <lm...@chambal.com> wrote:
> I have read but their are no information about index folder path. I have
> checked the code and got there are hardcoded the data path with index folder
> in SolrCore.java.
>
>  public String getIndexDir() {
>    return dataDir + "index/";
>  }
>
> So I need only this:
> public String getIndexDir() {
>    return dataDir;
>  }
>
>
> On Thu, Oct 23, 2008 at 4:54 PM, Noble Paul നോബിള്‍ नोब्ळ् <
> noble.paul@gmail.com> wrote:
>
>> please go through this url once
>>
>> http://lucene.apache.org/solr/tutorial.html
>>
>> --Noble
>>
>>
>>
>> On Thu, Oct 23, 2008 at 2:37 PM, Laxmilal Menaria <lm...@chambal.com>
>> wrote:
>> > Hello,
>> >
>> > I have created index of my xml files, these all index files are located
>> in
>> > data/index folder. Now  I have update the dataDir in  SolrConfig.xml to
>> > data only, but I want to specify  data/index, so how can I do that, I
>> have
>> > multiple data folders and want to separate it,
>> > index1, index2...
>> >
>> > --
>> > Thanks,
>> > Laxmilal menaria
>> >
>> > http://www.bucketexplorer.com/
>> > http://www.sdbexplorer.com/
>> > http://www.chambal.com/
>> > http://www.minalyzer.com/
>> >
>>
>>
>>
>> --
>> --Noble Paul
>>
>
>
>
> --
> Thanks,
> Laxmilal menaria
>
> http://www.bucketexplorer.com/
> http://www.sdbexplorer.com/
> http://www.chambal.com/
> http://www.minalyzer.com/
>



-- 
--Noble Paul

Re: How to change dataDir path in solrconfig xml

Posted by Laxmilal Menaria <lm...@chambal.com>.
I have read but their are no information about index folder path. I have
checked the code and got there are hardcoded the data path with index folder
in SolrCore.java.

 public String getIndexDir() {
    return dataDir + "index/";
  }

So I need only this:
public String getIndexDir() {
    return dataDir;
  }


On Thu, Oct 23, 2008 at 4:54 PM, Noble Paul നോബിള്‍ नोब्ळ् <
noble.paul@gmail.com> wrote:

> please go through this url once
>
> http://lucene.apache.org/solr/tutorial.html
>
> --Noble
>
>
>
> On Thu, Oct 23, 2008 at 2:37 PM, Laxmilal Menaria <lm...@chambal.com>
> wrote:
> > Hello,
> >
> > I have created index of my xml files, these all index files are located
> in
> > data/index folder. Now  I have update the dataDir in  SolrConfig.xml to
> > data only, but I want to specify  data/index, so how can I do that, I
> have
> > multiple data folders and want to separate it,
> > index1, index2...
> >
> > --
> > Thanks,
> > Laxmilal menaria
> >
> > http://www.bucketexplorer.com/
> > http://www.sdbexplorer.com/
> > http://www.chambal.com/
> > http://www.minalyzer.com/
> >
>
>
>
> --
> --Noble Paul
>



-- 
Thanks,
Laxmilal menaria

http://www.bucketexplorer.com/
http://www.sdbexplorer.com/
http://www.chambal.com/
http://www.minalyzer.com/

Re: How to change dataDir path in solrconfig xml

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
please go through this url once

http://lucene.apache.org/solr/tutorial.html

--Noble



On Thu, Oct 23, 2008 at 2:37 PM, Laxmilal Menaria <lm...@chambal.com> wrote:
> Hello,
>
> I have created index of my xml files, these all index files are located in
> data/index folder. Now  I have update the dataDir in  SolrConfig.xml to
> data only, but I want to specify  data/index, so how can I do that, I have
> multiple data folders and want to separate it,
> index1, index2...
>
> --
> Thanks,
> Laxmilal menaria
>
> http://www.bucketexplorer.com/
> http://www.sdbexplorer.com/
> http://www.chambal.com/
> http://www.minalyzer.com/
>



-- 
--Noble Paul