Solr delete not working for some reason

后端 未结 7 547
自闭症患者
自闭症患者 2021-01-30 09:19

Just trying to delete all the documents, and did this:

http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E
<         


        
相关标签:
7条回答
  • 2021-01-30 09:45

    Remember to clear the browser cache! I thought I was having the same problem, but it turned out that the browser had just cached the result and was returning the cached page. D'oh!

    0 讨论(0)
  • 2021-01-30 09:46

    In Lucene wiki :

    it will still be found, because index changes are not visible until, and a new searcher is opened. To cause this to happen, send a commit command to Solr (post.jar does this for you by default)

    Maybe you can POST a <commit/> message to Solr.

    0 讨论(0)
  • 2021-01-30 09:48

    Not sure if it matters but you might encode the : too

    http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*%3A*%3C%2Fquery%3E%3C%2Fdelete%3E
    

    Another thing to try is to use the POST method (the preferred way to call update):

    curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
    
    0 讨论(0)
  • 2021-01-30 09:48

    Put the commit=true parameter in you GET request:

    http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true

    0 讨论(0)
  • 2021-01-30 09:49

    Probably you are missing a forward slash (/) after update and before question mark.

    Current query:

    http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>&commit=true
    

    Revised query:

    http://localhost:8983/solr/update/?stream.body=<delete><query>*:*</query></delete>&commit=true
    
    0 讨论(0)
  • 2021-01-30 09:54

    I got stung with this one recently as well. Just remember that if you have updateLog is configured in solrconfig.xml, but there is no version field in the schema.xml

    see https://issues.apache.org/jira/browse/SOLR-3432

    I Spent a good hour on this one!!!

    0 讨论(0)
提交回复
热议问题