0
votes

I am using solr 5.3.0 and i need to create a core that have "/instanceDirectory" as its instance directory. Please get the current solr directory tree below:

  /opt/solr-5.3.0/

|-- bin
|   `-- init.d
|-- contrib
|  
|-- dist
|   
|-- docs
|   
|-- example
| 
|-- licenses
`-- server
    |-- contexts
    |-- etc
    |-- lib
    |   `-- ext
    |-- logs
    |-- modules
    |-- resources
    |-- scripts
    |   
    |-- solr
    |   |-- configsets
    |   |  
    |   |-- **solrcore1**
    |   |   |-- conf
    |   |   |   `-- lang
    |   |   `-- data
    |   |       |-- index
    |   |       |-- snapshot.20160603081946736
    |   |       |-- snapshot.20160613103014524
    |   |       `-- tlog
    |   |-- **solrcore2**
    |   |   |-- conf
    |   |   |   `-- lang
    |   |   `-- data
    |   |       |-- index
    |   |       |-- snapshot.20160603074933399
    |   |       |-- snapshot.20160603074950692
    |   |       `-- tlog
    |   `-- **solrcore3**
    |       |-- conf
    |       |   `-- lang
    |       `-- data
    |           |-- index
    |           |-- snapshot.20160603062030636
    |           |-- snapshot.20160603074938811
    |           `-- tlog
    |
    `-- solr-webapp
        `-- webapp
            |-- css
            |   |-- angular
            |   `-- styles
            |-- img
            |   |-- filetypes
            |   `-- ico
            |-- js
            |   |-- angular
            |   |   `-- controllers
            |   |-- lib
            |   `-- scripts
            |-- libs
            |-- partials
            |-- tpl
            `-- WEB-INF
                `-- lib

I want to have solrcore4 instance directory as "/solrcore4" not "/opt/solr-5.3.0/server/solr/solrcore4".

Can anyone help me to make this possible ?

Thanks in ADV.

1

1 Answers

1
votes

There are two levels of configuration:

  • Solr home. That's the root of all cores. In your case, it is probably server/solr. This can be changed, but will affect all the cores, not just one. You can change it by starting Solr with a different parameter for solr home (depending on your configuration) or by changing solr.xml file to point to a different location.
  • The other option is to have the core in one place but its changeable (data/index) files in another. This can be done by setting dataDir property in the core.properties file that marks the root of the core. It is also possible to use configSet property to have the config files somewhere else, but that's a bit more gimmicky.