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 Phuong Doan <ph...@dkd.de> on 2014/08/27 11:55:05 UTC

How to set storageDir for managed resource?

Hi,

currently I am using REST Api for managing synonyms and stopwords. My setup for Apache Solr 4.8.1 looks like:

<SOLR_HOME>/conf/
	_schema_analysis_synonyms_english.json
	_schema_analysis_stopwords_english.json
	solrconfig.xml
	english/schema.xml
	german/schema.xml
	etc.

My goal is to store the _schema_analysis_synonyms_english.json and _schema_analysis_stopwords_english.json in the language folder, not on the same level as solrconfig.xml. I’m using ClassicIndexSchemaFactory.

Setting storageDir as an attribute for ManagedSynonymFilterFactory occurs an error.

How can I set the storageDir for each language/core?


Thanks
Phuong

Re: How to set storageDir for managed resource?

Posted by Timothy Potter <th...@gmail.com>.
You can set the storageDir init-arg in the solrconfig.xml for the
RestManager for each core. However, since it is at the core config
level, you can't have a different storageDir per language. Here's an
example of how to configure the RestManager in solrconfig.xml to
customize the storageDir:

  <restManager>
    <str name="storageDir">SOME_PATH_HERE</str>
  </restManager>

If this is not flexible enough, you can supply your own StorageIO
implementation, doing:

  <restManager>
    <str name="storageIO">SOME CLASS HERE (implements
ManagedResourceStorage$StorageIO)</str>
  </restManager>



On Wed, Aug 27, 2014 at 2:55 AM, Phuong Doan <ph...@dkd.de> wrote:
> Hi,
>
> currently I am using REST Api for managing synonyms and stopwords. My setup for Apache Solr 4.8.1 looks like:
>
> <SOLR_HOME>/conf/
>         _schema_analysis_synonyms_english.json
>         _schema_analysis_stopwords_english.json
>         solrconfig.xml
>         english/schema.xml
>         german/schema.xml
>         etc.
>
> My goal is to store the _schema_analysis_synonyms_english.json and _schema_analysis_stopwords_english.json in the language folder, not on the same level as solrconfig.xml. I’m using ClassicIndexSchemaFactory.
>
> Setting storageDir as an attribute for ManagedSynonymFilterFactory occurs an error.
>
> How can I set the storageDir for each language/core?
>
>
> Thanks
> Phuong