2012-04-05 3 views
0

400 잘못된 요청 원인 SOLR에있는 모든 문서를 삭제나는 다음과 같은 내용으로 xml 파일 'cleanall.xml'를 만들어

java -Durl=http://localhost:8080/solr/update -jar post.jar cleanall.xml 

그것은 # 400 반환 나쁜 요청. 그러나 다른 명령을 내릴 경우 :

java -Ddata=args -Dcommit=yes -Durl=http://localhost:8080/solr/update -jar post.jar "<delete><query>*:*</query></delete>" 

다음 명령은 실행됩니다. post.jar은 xml 파일 인수에서 delete 명령을 지정할 수 있습니까?

답변

4

post.jar는 Solr 색인의 변경 사항을 자동으로 커밋합니다. 만 사용이 -

<delete><query>*:*</query></delete> 

그래서 당신은 XML을 명시 적으로 필요하지 않습니다.

400 오류는 xml에 여러 개의 뿌리가 있음을 나타냅니다.

Error 400 Illegal to have multiple roots (start tag in epilog?). 
관련 문제