These should all be equivalent, but it doesn't hurt to test them all.

{“delete”: {“id”: "1E089335-892C-41F6-B767-632EB5361775”}}

{“delete”: "1E089335-892C-41F6-B767-632EB5361775”}

{“delete”: ["1E089335-892C-41F6-B767-632EB5361775”]}

Op di 7 mrt 2023 om 22:25 schreef Walter Underwood <wun...@wunderwood.org>:

> Is it supposed to be:
>
> {“delete”: {“id”: "1E089335-892C-41F6-B767-632EB5361775”}}
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> https://observer.wunderwood.org/ (my blog)
>
> > On Mar 7, 2023, at 1:20 PM, Thomas Corthals <tho...@klascement.net>
> wrote:
> >
> > Got blindsided by the quotes and didn't notice you already have
> commit=true
> > as a URL parameter. That should already cover my suggestion.
> >
> > Op di 7 mrt 2023 om 22:06 schreef Thomas Corthals <tho...@klascement.net
> >:
> >
> >> Hi Matthew,
> >>
> >> There seems to be something strange going on with single quotes and
> >> backslashes around your delete command. Best to use double quotes
> inside a
> >> single quoted command argument when sending JSON like this.
> >>
> >> Maybe you queried too soon, before the change was committed to the
> index?
> >> You can add an explicit commit to the update command for testing
> purposes.
> >> (You probably shouldn't do that in production unless you absolutely
> can't
> >> tolerate any delays for the deletion.)
> >>
> >> curl --location --request POST
> 'xxxxx:8983/solr/talix/update?commit=true' \
> >> --header 'Content-Type: application/json' \
> >> --data-raw '{"delete": ["1E089335-892C-41F6-B767-632EB5361775"],
> "commit":
> >> {}}'
> >>
> >> Thomas
> >>
> >> Op di 7 mrt 2023 om 20:58 schreef Matthew Castrigno <castr...@slhs.org
> >:
> >>
> >>> Hello community,
> >>>
> >>> I am having trouble deleting a document by id.
> >>>
> >>> curl --location --request POST
> 'xxxxx:8983/solr/talix/update?commit=true'
> >>> \
> >>> --header 'Content-Type: application/json' \
> >>> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'
> >>>
> >>> responds with
> >>> {
> >>>    "responseHeader": {
> >>>        "status": 0,
> >>>        "QTime": 308
> >>>    }
> >>> }
> >>> But the document is still indexed.  What am I doing wrong? This used to
> >>> work but now does not for some reason.
> >>>
> >>> I have tried with a query also:
> >>> {'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}
> >>>
> >>> Thank you for your insights and thoughts. They are appreciated.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> *Matthew Castrigno*
> >>>
> >>> *IHT Developer II*
> >>>
> >>> *St. Luke’s Health System*
> >>>
> >>> (  208-859-4276
> >>> +  castr...@slhs.org <xxxxx...@slhs.org>
> >>> ------------------------------
> >>> "This message is intended for the use of the person or entity to which
> it
> >>> is addressed and may contain information that is confidential or
> >>> privileged, the disclosure of which is governed by applicable law. If
> the
> >>> reader of this message is not the intended recipient, you are hereby
> >>> notified that any dissemination, distribution, or copying of this
> >>> information is strictly prohibited. If you have received this message
> by
> >>> error, please notify us immediately and destroy the related message."
> >>>
> >>
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> https://observer.wunderwood.org/ (my blog)
>
>

Reply via email to