You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Sch�tt <ne...@pstt.de> on 2013/05/16 16:27:14 UTC

Explicite update or delete of a dataset

Hallo,
how can I update or delete a single dataset by a given ID?

Thanks for any hint.

Ciao
  Peter Sch�tt


Re: Explicite update or delete of a dataset

Posted by Peter Sch�tt <ne...@pstt.de>.
Hallo,
> To delete:
> 
> curl http://localhost:8983/solr/update?commit=true \
>      -H 'Content-type:application/json' \
>      -d '{"delete": {"id":"doc-0001"}}'

I try it in this way:

http://localhost:9180/solr/mycore/update?commit=true&stream.body=<delete>
<query>oid:"A6DBFADE63A75054E043AC1C02205054"</query></delete>

and it works.

Thanks for help.

Ciao
  Peter Sch�tt


Re: Explicite update or delete of a dataset

Posted by Jack Krupansky <ja...@basetechnology.com>.
Update is the same as add in Solr.

To delete:

curl http://localhost:8983/solr/update?commit=true \
     -H 'Content-type:application/json' \
     -d '{"delete": {"id":"doc-0001"}}'

-- Jack Krupansky

-----Original Message----- 
From: Peter Schütt
Sent: Thursday, May 16, 2013 10:27 AM
To: solr-user@lucene.apache.org
Subject: Explicite update or delete of a dataset

Hallo,
how can I update or delete a single dataset by a given ID?

Thanks for any hint.

Ciao
  Peter Schütt