Solr FQA

1. Question: sometimes the after closing the SolrServer, there is a file write.lock generated in the folder $INDEX_HOME/index/write.lock. Then next time, you want to start the server, there is an exception complaining the IndexWriter is locked.
1. Answer:  Manually delete the write.lock file. or adding the below lines into solrconfig.xml file avoids the issue of physically removing the write.lock file when doing indexing.  

  <lockType>simple</lockType>
  <unlockOnStartup>true</unlockOnStartup>

It's better to find a way to delete it pragmatically.

2. how to delete all index from curl
curl http://localhost:8080/solr/update -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

猜你喜欢

转载自ilnba.iteye.com/blog/1558946