Use this to clear the solr server.

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


On Wed, Sep 7, 2011 at 10:48 AM, Roland Tollenaar <rwatollen...@gmail.com>wrote:

> Hi All,
>
> I want to clear the solr server and start loading documents afresh.
>
> According to the information I found on internet I would have to do
> somethign like this:
>
> http://localhost:8983/solr/**update?commit=true&-H&Content-**
> Type:&text/xml&--data-binary&<http://localhost:8983/solr/update?commit=true&-H&Content-Type:&text/xml&--data-binary&;>
> '**<delete><query>*:*</query></**delete>'
>
> which in my case returns:
>
> <?xml version=1.0 encoding=UTF-8?>
>
> <response>
>
> <lst name=responseHeader><int name=status>0</int><int
> name=QTime>0</int></lst>
>
> </response>
>
>
> I have tried following this command up with:
>
>
> http://localhost:8983/solr/**update?commit=true&-H&Content-**
> Type:&text/xml&--data-binary&<http://localhost:8983/solr/update?commit=true&-H&Content-Type:&text/xml&--data-binary&;>
> '**<commit/>'
>
>
> and
>
> -http://localhost:8983/solr/**update?commit=true&-H&Content-**
> Type:&text/xml&--data-binary&<http://localhost:8983/solr/update?commit=true&-H&Content-Type:&text/xml&--data-binary&;>
> '**<optimize/>'
>
>
> all of which reply with the same
>
> <?xml version=1.0 encoding=UTF-8?>
>
> <response>
>
> <lst name=responseHeader><int name=status>0</int><int
> name=QTime>0</int></lst>
>
> </response>
>
> response.
>
> But when I run a query, all data is still returned.
>
> I have also tried removing an entry specifically by id, exactly the same
> behaviour. Record is never deleted.
>
>
> Restarting the solr server after all this also does not help.
>
>
> I have also tried using curl but that complains to this line:
>
> >curl 
> >http://localhost:8983/solr/**update?commit=true<http://localhost:8983/solr/update?commit=true>-H
> > "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></
> **delete>'
>
>
> with:
>
> "< was unexpected at this time."
>
>
> no idea what to make of that......
>
>
> I hope someone can give some advice here.
>
> Thanks in advance.
>
>
> regards,
>
>
> Roland
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to