• Home
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • Python
  • Ubuntu
  • Maven
  • Archived
  • About
Apache Solr | XML Messages: delete operation
  1. Notes
  2. Example: delete a document by id
  3. Example: delete documents by query
  4. Delete documents using the update request handler
  5. Delete documents using the update request handler (stream.body)

  1. Notes
    Please visit this Solr wiki page for more information: https://cwiki.apache.org/confluence/display/solr/UpdateXmlMessages

    You can use XML requests to:
    • Delete documents by id: deletes a document that match the specified id.

    • Delete documents by query: deletes documents that match the specified query.

    Here's the structure of the delete operation:
  2. Example: delete a document by id
    Here's a sample XML message to delete an existing document by its id:
  3. Example: delete documents by query
    Here's a sample XML message to delete existing documents by query:

    To delete all documents:
  4. Delete documents using the update request handler
    Here's an example of an http request to delete a document by id:

    Here's an example of an http request to delete documents by query:
  5. Delete documents using the update request handler (stream.body)
    Here's an example of an http request that uses the parameter stream.body:

    In order for this request to work, you need to enable Streaming in "solrconfig.xml":

    If you want to update the "solrconfig.xml" file directly in the Configset, make sure to reload all collections that use the updated Configset.
    Please visit this page for more details: http://lucene.apache.org/solr/guide/8_5/requestdispatcher-in-solrconfig.html
© 2025  mtitek