Hello, I need to add all documents in a folder to collection and it failed:
Here is my command: hostname: mysolr Solr Admin URL: http://mysolr.net:8983/solr/#/ Collection name: collection_indexer Collection url: http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1 data folder: /tmp/solr_data Running folder: bash-4.1$ pwd /opt/cloudera/parcels/CDH/jars command: java -Dtype=application/json -Drecursive -Durl=" http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs" -jar post.jar /tmp/solr_data Output: bash-4.1$ java -Dtype=application/json -Drecursive -Durl=" http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs" -jar post.jar /tmp/solr_data SimplePostTool version 1.5 Posting files to base url http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs using content-type application/json.. Entering recursive mode, max depth=999, delay=0s Indexing directory /tmp/solr_data (1 files, depth=0) POSTing file test.json SimplePostTool: WARNING: Solr returned an error #405 (Method Not Allowed) for url: http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs SimplePostTool: WARNING: Response: Apache Tomcat/6.0.45 - Error report 525D76;}--> HTTP Status 405 - HTTP method POST is not supported by this URL noshade="noshade"> type Status report message HTTP method POST is not supported by this URL description The specified HTTP method is not allowed for the requested resource. Apache Tomcat/6.0.45 SimplePostTool: WARNING: IOException while reading response: java.io.IOException: Server returned HTTP response code: 405 for URL: http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs 1 files indexed. COMMITting Solr index changes to http://mysolr.net:8983/solr/#/collection_indexer_shard1_replica1/update/json/docs.. Time spent: 0:00:00.100 I also tried: http://mysolr.net:8983/solr/#/collection_indexer/update/json/docs as the Durl and got same error message. Note the end of error message seems to give hint that the error pertains to the url or REST, can you please clarify what is missing here? Thank you very much. *------------------------------------------------* *Sincerely yours,* *Raymond*