Solr XML Document Update
In this section of the tutorial, we will update the existing indexed documents with new records. In the previous section, we created the moneydata.xml XML document and added it to the Solr index. Now we will update the documents of id=USD with the below new records.
We have created a new XML file with the name moneydata_update.xml and we will use this file to update the existing index records.
The content of the moneydata_update.xml file is mentioned below.
USD Dollar Crrency United States of America Bank It is currency Coins and notes 1,United States Dollar present
We will use the moneydata_update.xml file to update the existing index records which were added as a moneydata.xml in the previous section.
Command:cloudduggu@ubuntu:~/hadoop/solr-8.8.1/bin$ ./post -c Solr_sample_core moneydata_update.xml
After the successful execution of the command, we will see the following output.
We can verify the record update in the Solr web portal as well. Click on the Query tab and Execute the query by clicking on the Execute Query button. We can see the updated records in the output.