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

Shawn Heisey commented on SOLR-3319:
------------------------------------

Here are some general ideas, preliminary because I have not taken a close look 
at the code yet.  For reference, here is a completed status response on a 
full-import from 3.5.0:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">0</int>
</lst>
<lst name="initArgs">
  <lst name="defaults">
    <str name="config">dih-config.xml</str>
  </lst>
</lst>
<str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages">
  <str name="Total Requests made to DataSource">1</str>
  <str name="Total Rows Fetched">11287894</str>
  <str name="Total Documents Skipped">0</str>
  <str name="Full Dump Started">2012-04-03 17:38:01</str>
  <str name="">Indexing completed. Added/Updated: 11287894 documents. Deleted 0 
documents.</str>
  <str name="Committed">2012-04-03 20:16:32</str>
  <str name="Total Documents Processed">11287894</str>
  <str name="Time taken ">2:38:31.314</str>
</lst>
<str name="WARNING">This response format is experimental.  It is likely to 
change in the future.</str>
</response>
{code}

I was thinking it might be a good idea to have two response sections in 
addition to the echoParams section already mentioned - one for a human readable 
response and one for a relatively terse machine readable response.  The human 
readable version would be fairly open to change, and could include extra 
verbiage so it's very understandable for a person.

The machine readable version would have more elements, each of which is very 
simple, probably just a numeric value or a true/false indicator.  A design 
decision needs to be made early - do we include all elements in every response 
(with the value set to zero, blank, or false), even if they don't apply to the 
current status?  My first instinct is to include all elements, but maybe that's 
wrong.
                
> Improve DataImportHandler status response
> -----------------------------------------
>
>                 Key: SOLR-3319
>                 URL: https://issues.apache.org/jira/browse/SOLR-3319
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 3.5, 4.0
>            Reporter: Shawn Heisey
>            Priority: Minor
>             Fix For: 4.0
>
>
> The DataImportHandler has some oddities and inconsistencies in its status 
> response that make it difficult to write code that parses DIH status, 
> especially if both full-import and delta-import are required.  See SOLR-2729.
> I would like to have a discussion where we come up with a well-defined and 
> consistent format that can be used programatically as well as be human 
> readable, and then I can implement it, or someone else can if they really 
> want to.  I think it would be very useful if the status response included all 
> parameters that went into the import request, like echoParams in the query 
> interface.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to