[
https://issues.apache.org/jira/browse/SOLR-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464737
]
Thorsten Scherler commented on SOLR-86:
---------------------------------------
Hi Hoiss, I had a look at your version and it is good as gold.
I personally prefer the httpClient since the method is smaller but Bertrand and
ourself are right, the dependency jar price for a simple replacement is ATM too
high.
The only thing that I would add is directory support:
...
+ if (srcFile.exists()) {
+ if (srcFile.isDirectory()) {
+ File[] fileSet = srcFile.listFiles();
+ for (int i = 0; i < fileSet.length; i++) {
+ File file = fileSet[i];
+ tool.postFile(file, out);
+ } else {
+ tool.postFile(srcFile, out);
+ }
+ System.out.println();
+ } else {
+ System.err.println(srcFile + " does not exist");
+ }
I agree to your patch as official replacement of the post.sh. I further agree
with Bertrand that we may include patch as base demonstration for more complex
client apps.
> [PATCH] standalone updater cli based on httpClient
> ---------------------------------------------------
>
> Key: SOLR-86
> URL: https://issues.apache.org/jira/browse/SOLR-86
> Project: Solr
> Issue Type: New Feature
> Components: update
> Reporter: Thorsten Scherler
> Attachments: simple-post-using-urlconnection-approach.patch,
> solr-86.diff, solr-86.diff
>
>
> We need a cross platform replacement for the post.sh.
> The attached code is a direct replacement of the post.sh since it is actually
> doing the same exact thing.
> In the future one can extend the CLI with other feature like auto commit,
> etc..
> Right now the code assumes that SOLR-85 is applied since we using the servlet
> of this issue to actually do the update.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira