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

James Dyer updated SOLR-2115:
-----------------------------

    Attachment: SOLR-2115.patch

With this patch...

- DIH attempts to reload the configuration every time a new import is started.  
This is slightly more overhead, but negligible compared with the time an import 
takes as a whole.

- The config is not loaded on startup and there is no need to have a <defaults 
/> section or have the config declared in solrconfig.xml at all.  Instead users 
have the option to specify the config file on the request with the "config" 
parameter.

- The "dataConfig" parameter, which lets users include the entire configuration 
as a request parameter is now always supported (previously this was only 
supported in debug mode)

-The "reload-config" command is still supported, which is useful for validating 
a new configuration file, or if you want to specify a file, load it, and not 
have it reloaded again on import. 

- Datasources can still be specified in solrconfig.xml.  As before these must 
be specified in the "defaults" section of the handler in solrconfig.xml.  
However, these are not parsed until the main configuration is loaded.

- If there is an xml mistake in the configuration a much more user-friendly 
message is given in xml format, not raw format as before.  Users can fix the 
problem and "reload-config".
                
> DataImportHandler config file *must* be specified in "defaults" or status 
> will be "DataImportHandler started. Not Initialized. No commands can be run"
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2115
>                 URL: https://issues.apache.org/jira/browse/SOLR-2115
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4.1, 1.4.2, 3.1, 4.0-ALPHA
>            Reporter: Lance Norskog
>            Assignee: James Dyer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-2115.patch
>
>
> The DataImportHandler has two URL parameters for defining the data-config.xml 
> file to be used for the command. 'config' is used in some places and 
> 'dataConfig' is used in other places.
> 'config' does not work from an HTTP request. However, if it is in the 
> "defaults" section of the DIH <requestHandler> definition, it works. If the 
> 'config' parameter is used in an HTTP request, the DIH uses the default in 
> the <requestHandler> anyway.
> This is the exception stack recieved by the client if there is no default. 
> (This is the 3.X branch.)
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 500 </title>
> </head>
> <body><h2>HTTP ERROR: 500</h2><pre>null
> java.lang.NullPointerException
>       at 
> org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:146)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> ..etc..

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to