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

Alexandre Rafalovitch commented on SOLR-6959:
---------------------------------------------

This is a very interesting and educational question. The fact that the 
*/update* is a *base* is not well explained anywhere. I just run the test
{quote}
java -Durl=http://localhost:8983/solr/techproducts/update2 -Dauto -jar post.jar 
*
{quote}

And it did do *POST /solr/techproducts/update2/extract* for the PDF file. Not 
what I expected somehow.

My main concern is reducing the magic through a better message. If somebody 
posted a file and something unexpected happened, they would troubleshoot it by 
following the _request handler_ and it's parameters as one of the steps. But we 
don't tell them here which request handler it is. We give only one piece of 
information here that just happen to also be a valid _request handler_.

They could pick that information up from the log file I guess if they had 
access to it and knew what to look for. But it would be easier if the tool was 
more clear about it, as it does not know exactly what happened.

What if we add something like this to the message:
{quote}
POSTing file books.csv (text/csv) to \[base]
POSTing file solr-word.pdf (application/pdf) to \[base]/extract
{quote}

Where the word \[base] is just that - the word.

This could also clarify a bit the situation with the fact that XML, CSV, and 
JSON go to the same handler, yet we have - slightly confusingly - request 
handlers for both CSV and JSON in the solrconfig.xml.

The help message for the tool needs to be improved as well. It says 
*solr-update-url* and nothing about base and suffixes.

> SimplePostTool reports incorrect base url for PDFs
> --------------------------------------------------
>
>                 Key: SOLR-6959
>                 URL: https://issues.apache.org/jira/browse/SOLR-6959
>             Project: Solr
>          Issue Type: Bug
>          Components: scripts and tools
>    Affects Versions: 5.0
>            Reporter: Alexandre Rafalovitch
>            Assignee: Erik Hatcher
>            Priority: Minor
>              Labels: tools
>
> {quote}
> $ java -Dc=techproducts -Dauto -Dcommit=no -jar post.jar solr-word.pdf
> SimplePostTool version 1.5
> Posting files to base url http://localhost:8983/solr/techproducts/update..
> {quote}
> This command will *not* post to */update*, it will post to */update/extract*. 
> This should be reported correspondingly.
> From the server log:
> {quote}
> 127.0.0.1 -  -  \[11/Jan/2015:17:17:10 +0000] "POST 
> /solr/techproducts/update/extract?resource.name=....
> {quote}
> It would make sense for that message to be after the auto-mode determination 
> just before the actual POST.
> Also, what's with two dots after the url? If it is _etc_, it should probably 
> be three dots.



--
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