[ 
https://issues.apache.org/jira/browse/SOLR-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574785#comment-14574785
 ] 

Shawn Heisey commented on SOLR-7640:
------------------------------------

The URL is parsed by the servlet container, which doesn't have any visibility 
into Solr and cannot know the solr home.

Even if that info makes past the servlet container into Solr, it is unlikely 
that the admin handler is set up to parse property substitution.  I've never 
seen this capability.  

> ${solr.solr.home} passed via url is empty when creating a core (admin CREATE)
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-7640
>                 URL: https://issues.apache.org/jira/browse/SOLR-7640
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 5.1
>            Reporter: Anton
>
> Here is example of the command we use:
> {code}
> http://192.168.0.47:8983/solr/admin/cores?action=CREATE&name=tickets_core&instanceDir=cores/tickets&config=${solr.solr.home}/schemas/tickets/conf/solrconfig.xml&schema=${solr.solr.home}/schemas/tickets/conf/schema.xml&dataDir=../../indexes/tickets/&persist=true&transient=true&loadOnStartup=false
> {code}
> As a result {code}${solr.solr.home}{code} is replaced with empty value (or 
> wit default if we specify it)
> {code}
> 4344140 [qtp853251756-15] INFO  org.apache.solr.servlet.SolrDispatchFilter  [ 
>   ] Ц 
> [admin] webapp=null path=/admin/cores 
> params={schema=${solr.solr.home}/schemas/tickets/conf/schema.xml&loadOnStartup=false&instanceDir=cores/tickets&transient=true&name=tickets_core&action=CREATE&config=${solr.solr.home}/schemas/tickets/conf/solrconfig.xml&persist=true&dataDir=../../indexes/tickets/}
>  status=400 QTime=57
> 4344347 [qtp853251756-12] ERROR org.apache.solr.servlet.SolrDispatchFilter  [ 
>   ] Ц 
> null:org.apache.solr.common.SolrException: SolrCore 'tickets_core' is not 
> available due to init failure: 
> Could not load conf for core tickets_core: Error loading solr config from 
> d:\development\projects\helprace\main\solr\cores\tickets\conf\/schemas/tickets/conf/solrconfig.xml
> {code}
> d:\development\projects\helprace\main\solr\cores\tickets\conf\/schemas/tickets/conf/solrconfig.xml
> In case of questions why we do in this way:
> We have parrallel tests running. On each separate process we create a single 
> solr core with same schema.
> Due to this we use same schema and solrconfig files, separate index folder 
> and separate instanceDir (core.properites for each core).
> Copying config files is not possible because core has random name and is 
> created dynamically.
> When the core is being created it's instanceDir does not exist yet and due to 
> this we cannot use relative path from this folder to config files. (this 
> works on windows, but unix systems do not allow relative path with non 
> existent folder)
> We tried to use absolute path for schema.xml and solrconfig.xml and used 
> {code}${solr.solr.home}{code}, but it i's empty (but it works in config files)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to