LoginSignup
1
1

More than 5 years have passed since last update.

Watson Retrieve and Rankでよく使用するコマンド

Last updated at Posted at 2017-09-12

APIドキュメント

公式チュートリアル

Commands

  • list clusters
    curl -k -G -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters"

  • create cluster
    curl -k -X POST -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters" -d ""

  • del cluster
    curl -k -X DELETE -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{cluster_id}"

  • solrの設定ファイルをアップロード
    curl -k -X POST -H "Content-Type: application/zip" -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{cluster_id}/config/{作成する設定の名前}" --data-binary @setting_files.zip

  • Collectionの作成
    curl -X POST -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{cluster_id}/solr/admin/collections" -d "action=CREATE&name={作成するコレクションの名前}&collection.configName={コレクションに適用したい設定名}"

  • JSON形式で回答データをアップロード

curl -X POST -H "Content-Type: application/json" -u "{username}:{password}" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/{cluster_id}/solr/{collection_name}/update" --data-binary @answers.json

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1