I tried to use ${solr.core.instanceDir} in schema.xml with Solr 4.0,
where every deployment is multi-core, and it didn't work.
It must be that the description about pre-defined properties in
CoreAdmin wiki page is wrong, or it only works in solrconfig.xml, perhaps?
On 11/28/12 5:17 PM, T. Kuro Kurosaka wrote:
Thank you, Hoss.
I found this SolrWiki page talks about pre-defined properties such as
solr.core.instanceDir:
http://wiki.apache.org/solr/CoreAdmin
I tried to use ${solr.core.instanceDir} in the default single-core
schema.xml, and it didn't work.
Is this page wrong, or these properties are available only in
multi-core deployments?
On 11/27/12 2:27 PM, Chris Hostetter wrote:
: The default solrconfig.xml seems to suggest ${solr.data.dir} can be
used.
: So I am hoping there is another pre-defined variable like this that
points to
: the solr core directory.
there's nothing special about solr.data.dir ... it's used i nthe example
configs as a convinient way to let you override it on the command line
when running the example, otherwise it defaults to the empty string
which
triggers the default dataDir logic (ie: ./data in the instanceDir)...
<dataDir>${solr.data.dir:}</dataDir>
:<charFilter
class="com.basistech.rlp.solr.RCLUNormalizeCharFilterFactory"
: rlpContext="solr/conf/rlp-context-rclu.xml"/>
:
: This only works if Solr is started from $SOLR_HOME/example, as it
is relative
: to the current working directory.
if your factories are using the SolrResourceLoader.openResource to load
those files then you can change that to just be
'rlpContext="rlp-context-rclu.xml"'
and it will just plain work -- the SolrResourceLoader is
SolrCloud/ZooKeeper aware, and in stadalone mode checks the conf dir,
the classpath, and as a last resort attempts to resolve it as an
relative
path -- if your custom factories just call "new File(rlpContext)" on the
string, then you're stuck using absolute paths, or needing to define
system properties at runtime.
-Hoss