2017-11-21 5 views
0

私はapache solr 7.1をセットアップし、それを問い合わせるためにpostmanツールを使用しました。しかし、郵便配達員を使ってインデックスデータを削除しようとすると、私は次のエラーに遭遇します。org.apache.solr.common.SolrExceptionストリーム本体が無効にされています

要求:

GET http://localhost:8983/solr/solr-sample3/update?stream.body={ 
    "delete": { 
     "query": "*:*" 
    }, 
    "commit": { } 
} 

ボディ:

{ 
    "error": { 
     "metadata": [ 
      "error-class", 
      "org.apache.solr.common.SolrException", 
      "root-error-class", 
      "org.apache.solr.common.SolrException" 
     ], 
     "msg": "Stream Body is disabled. See http://lucene.apache.org/solr/guide/requestdispatcher-in-solrconfig.html for help", 
     "code": 400 
    } 
} 

それは6.6 Solrの以前のSolrバージョンで働いていました。私はluceneのドキュメントを読んだが、私はそれを理解することができない。

答えて

0

私はドキュメンテーションを行ったところ、ストリーム本体がsolr 7.1で無効になっているため、ストリーム本体を有効にする必要があると言います。使用を可能にする

curl http://localhost:8983/solr/solr-sample3/config -H 'Content-type:application/json' -d'{ 
    "set-property" : {"requestDispatcher.requestParsers.enableRemoteStreaming":true}, 
    "set-property" : {"requestDispatcher.requestParsers.enableStreamBody":true} 
}' 
0

あなたは、ストリーム本体を有効にする必要はありません。

bin/post -c core_name -type text/xml -out yes -d $'<delete><query>*:*</query></delete>' 
を:text/xmlで

curl http://localhost:8983/solr/solr-sample3/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

それとも、ポストツールを使用している場合は、Solrの中に含まれるだけで、データ型を指定するカールPOSTリクエストを使用します

関連する問題