2017-11-21 1 views
0

나는 apache solr 7.1을 설정하고 포스트맨 도구를 사용하여 쿼리했습니다. 그러나 우편 발송자를 사용하여 색인 된 데이터를 삭제하려고 할 때 다음 오류가 발생합니다.org.apache.solr.common.SolrException 스트림 본문이 비활성화되었습니다.

요청 :

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

바디 :

그것은 6.6 SOLR 이전 SOLR 버전에서 작업 된
{ 
    "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 
    } 
} 

. 나는 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>' 
: 그냥 텍스트/XML로 데이터 형식을 지정하는 컬 POST 요청을 사용 당신이 사용하는 경우

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

가 아니면 포스트 도구 SOLR에 포함

관련 문제