Goal:
A guide to delete documents from Fusion via the Index Pipeline API's.
Environment:
Fusion 4.x.x & Fusion 5.x.x
Guide:
You can delete documents from Fusion using the Index Pipeline API.
For example, If you have a document with id = 1234 which you would like to delete from Fusion, you can delete the document using the following:
Note: In the command(s) below, update the id value and all the variables (prefaced with a $):
Fusion 4.x - 5.1.x
curl -u $username:$password -X POST -H \
"Content-Type: application/vnd.lucidworks-document" -d \
'[{ "id": "1234","commands": [{"name": "delete","params": {}}, {"name": "commit","params": {}}]}]' \
http://$fusionHost:$fusionPort/api/apollo/index-pipelines/$indexPipelineId/collections/$collection/index
Fusion 5.2.0+
curl -u $username:$password -X POST -H \
"Content-Type: application/vnd.lucidworks-document" -d \
'[{ "id": "1234","commands": [{"name": "delete","params": {}}, {"name": "commit","params": {}}]}]' \
http://$fusionHost:$fusionPort/api/index-pipelines/$indexPipelineId/collections/$collection/index
Note: In 5.2.0+ the REST API endpoint /api/apollo/..
in earlier versions has been replaced with /api/..
.
Comments
0 comments
Article is closed for comments.