[ 
https://issues.apache.org/jira/browse/SOLR-12126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Tikhonov updated SOLR-12126:
-----------------------------------
    Description: 
Starting from solr 7.2 there is stream.body with default false, but you can 
configure it via solrconfig.xml except one case - EmbeddedSolrServer. In this 
case SolrRequestParsers always got null instead of solr core config. That means 
you can't configure some parameters in case of EmbeddedSolrServer.
{code:java}
public EmbeddedSolrServer(CoreContainer coreContainer, String coreName) {
  if (coreContainer == null) {
    throw new NullPointerException("CoreContainer instance required");
  }
  if (Strings.isNullOrEmpty(coreName))
    throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Core name 
cannot be empty");
  this.coreContainer = coreContainer;
  this.coreName = coreName;
  _parser = new SolrRequestParsers(null);
}{code}
 
 Here is a pull request - [https://github.com/apache/lucene-solr/pull/340] , 
with some basic tests.

  was:
As you can see, now there is null in SolrRequestParsers constructor in 
EmbeddedSolrServer. This solution not allow to use some settings in solrconfig 
- stream.body for example
{code:java}
public EmbeddedSolrServer(CoreContainer coreContainer, String coreName) {
  if (coreContainer == null) {
    throw new NullPointerException("CoreContainer instance required");
  }
  if (Strings.isNullOrEmpty(coreName))
    throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Core name 
cannot be empty");
  this.coreContainer = coreContainer;
  this.coreName = coreName;
  _parser = new SolrRequestParsers(null);
}{code}
 
 Here is a pull request - https://github.com/apache/lucene-solr/pull/339


> EmbeddedSolrServer don't pass solrconfig to SolrRequestParsers
> --------------------------------------------------------------
>
>                 Key: SOLR-12126
>                 URL: https://issues.apache.org/jira/browse/SOLR-12126
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Server
>    Affects Versions: 7.2
>            Reporter: Dmitry Tikhonov
>            Priority: Major
>             Fix For: 7.3
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Starting from solr 7.2 there is stream.body with default false, but you can 
> configure it via solrconfig.xml except one case - EmbeddedSolrServer. In this 
> case SolrRequestParsers always got null instead of solr core config. That 
> means you can't configure some parameters in case of EmbeddedSolrServer.
> {code:java}
> public EmbeddedSolrServer(CoreContainer coreContainer, String coreName) {
>   if (coreContainer == null) {
>     throw new NullPointerException("CoreContainer instance required");
>   }
>   if (Strings.isNullOrEmpty(coreName))
>     throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Core name 
> cannot be empty");
>   this.coreContainer = coreContainer;
>   this.coreName = coreName;
>   _parser = new SolrRequestParsers(null);
> }{code}
>  
>  Here is a pull request - [https://github.com/apache/lucene-solr/pull/340] , 
> with some basic tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to