On 5/25/2016 10:16 PM, scott.chu wrote:
> Thanks! I thought I have to tune solrconfig.xml.
>
> scott.chu,scott....@udngroup.com
> 2016/5/26 (週四)
> ----- Original Message ----- 
> From: Jay Potharaju 
> To: solr-user ; scott(自己) 
> CC: 
> Date: 2016/5/26 (週四) 11:31
> Subject: Re: How to save index data to other place? [scottchu]
>
>
> use property.*dataDir*=*value* 
> https://cwiki.apache.org/confluence/display/solr/Defining+core.properties 

In general, I only place *relative* paths in dataDir ... but for most
people, I would actually recommend not setting dataDir at all, and
letting it default to "data".

Rather, what I would do is set the solr home to another location, so
*all* cores live there by default, and let Solr create its default
directory structure in that location.

You haven't indicated in this thread whether you're running on a UNIX or
UNIX-like OS such as Linux, or whether you're running on Windows.  You
used both slashes and backslashes when you described your actual and
desired index paths.

For most operating systems other than Windows, I strongly recommend
using the solr installer shell script.  This script has a concept of a
"var dir", and the solr home is a directory inside that.

If you are using the installer shell script to install Solr and do not
provide any options, then Solr itself will install to /opt/solr-X.Y.Z, a
symlink at /opt/solr will be created that points to the install
directory, and Solr will set its var dir to /var/solr.  A configuration
script will be created at /etc/default/solr.in.sh.  In the configuration
script, the solr home gets set to /var/solr/data.  Each core created
would create a directory under /var/solr/data with the core's name, and
inside that directory would be a data directory, containing the index
directory and the tlog directory.  These paths assume you've got 5.5 or
later.

On a dev server, I used the installer script with a service name (-s
option) of solr5.  With this option, most of the paths get changed from
the default.  The symlink is /opt/solr5 pointing to /opt/solr-5.5.1, the
var dir is /var/solr5, the configuration script is
/etc/default/solr5.in.sh, and the solr home is /var/solr5/data.

Thanks,
Shawn

Reply via email to