{"id":45,"date":"2014-05-21T08:16:00","date_gmt":"2014-05-21T08:16:00","guid":{"rendered":"https:\/\/scgindia.in\/lhotsetechnologies\/dev\/2014\/05\/21\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/"},"modified":"2020-01-17T08:00:41","modified_gmt":"2020-01-17T08:00:41","slug":"using-post-jar-for-posting-json-csv-xml-data-on-solr","status":"publish","type":"post","link":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/","title":{"rendered":"Using post.jar for posting JSON, CSV, XML data on Solr"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"text-align: justify;\">In my last few post, I discussed about <b>&#8220;Dashboard introduction &amp; how to post data on Apache Solr via it&#8217;s dashboard screen&#8221;<\/b> &amp; also provides many examples for the same. In that approach, I can post only one record at a time i.e. I am not able to post data using different files having differently formatted records like JSON, XML, CSV.<\/div>\n<div style=\"text-align: justify;\"><b>Agenda for this post<\/b><\/div>\n<div style=\"text-align: justify;\">\n<p>&nbsp;<\/p>\n<ol>\n<li><span style=\"color: #660000;\">how to post&nbsp;XML&nbsp;data in form of a XML file using post.jar file?<\/span><\/li>\n<li><span style=\"color: #660000;\">how to post CSV data in form of a CSV file using post.jar file?<\/span><\/li>\n<li><span style=\"color: #660000;\">how to post&nbsp;JSON data in form of a JSON file using &nbsp;post.jar file?<\/span><\/li>\n<\/ol>\n<\/div>\n<div style=\"text-align: justify;\">Schema for this post is same as that of my last post<br \/>\n<a style=\"text-align: left;\" href=\"http:\/\/versatileankur.blogspot.in\/2014\/05\/how-to-query-to-apache-solr.html\">http:\/\/versatileankur.blogspot.in\/2014\/05\/how-to-query-to-apache-solr.html<\/a><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><b>how to post&nbsp;XML&nbsp;data in form of a XML file using post.jar file?<\/b><\/div>\n<div style=\"text-align: justify;\">Apache java comes with a inbuilt jar file for document posting. This file is present at<br \/>\n<b>&lt;parent-directory&gt;\/solr-4.7.2\/example\/exampledocs<\/b><\/div>\n<div style=\"text-align: justify;\">This exampledocs directory have many XML files for demo purpose.&nbsp;<\/div>\n<div style=\"text-align: justify;\">How to post XML document files using this jar file.<\/div>\n<div style=\"text-align: justify;\">just create a&nbsp;XML&nbsp;file with given records.<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">&lt;add&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;id&#8221;&gt;Solr105&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;name&#8221;&gt;Solr 105&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;address&#8221;&gt;House No &#8211; 100, LR Apache, 40702&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;comments&#8221;&gt;Apache Solr comment 1&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;popularity&#8221;&gt;101&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;counts&#8221;&gt;1&lt;\/field&gt; &nbsp; &nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;\/doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;id&#8221;&gt;Solr106&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;name&#8221;&gt;Solr 106&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;address&#8221;&gt;House No &#8211; 100, LR Apache, 40702&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;comments&#8221;&gt;Apache Solr comment 2&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;popularity&#8221;&gt;100&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;counts&#8221;&gt;2&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;dynamicField_i&#8221;&gt;It is dynamically genrated field.&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;\/doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;id&#8221;&gt;Solr107&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;name&#8221;&gt;Solr 107&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;address&#8221;&gt;House No &#8211; 100, LR Apache, 40702&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;comments&#8221;&gt;Apache Solr It&#8217;s Cool.&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;popularity&#8221;&gt;109&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;counts&#8221;&gt;3&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &nbsp; &nbsp;&lt;field name=&#8221;dynamicField_i&#8221;&gt;It is dynamically genrated field.&lt;\/field&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"> &lt;\/doc&gt;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">&lt;\/add&gt;<\/span><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><b>Save<\/b> this file as <b>dummy.xml<\/b> under <b>&lt;solr&gt;\/example\/exampledocs<\/b> directory.<\/div>\n<div style=\"text-align: justify;\">Go to exampledocs directory using command prompt &amp; execute &#8211;<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000;\">java -jar post.jar dummy.xml<\/span><br \/>\n<b><br \/>\n<\/b>For multiple XML files use &#8211;<br \/>\n<span style=\"color: #660000;\">java -jar post.jar dummy.xml dummy1.xml<\/span><br \/>\n<b><br \/>\n<\/b>For all XML files present in working directory use-<br \/>\n<span style=\"color: #660000;\">java -jar post.jar *.xml<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">SimplePostTool version 1.5<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">Posting files to base url http:\/\/localhost:8983\/solr\/update using content-type application\/xml..<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">POSTing file dummy.xml<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">1 files indexed.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">COMMITting Solr index changes to http:\/\/localhost:8983\/solr\/update..<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\">Time spent: 0:00:00.547<\/span><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\">it means your data XML document has been indexed on Apache Solr. just go to your dashboard screen<\/div>\n<div style=\"text-align: justify;\"><b>select collection1 -&gt; query-&gt; Click on Execute Query Button<\/b><\/div>\n<div style=\"text-align: justify;\">you will get a screen just like.<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\"><\/a><\/div>\n<div style=\"text-align: justify;\">Syntax of XML file<\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><b>&lt;add&gt;&lt;\/add&gt;<\/b> it behaves a the parent of all the records\/entities i.e. <b>Root Element<\/b>.<\/div>\n<div style=\"text-align: justify;\"><b>&lt;doc&gt;&lt;doc&gt;<\/b> it denotes one record\/entity to be added on Apache solr.<\/div>\n<div style=\"text-align: justify;\"><b>&lt;field&gt;&lt;\/field&gt;<\/b> it denotes the property of a record\/entity.<\/div>\n<div style=\"text-align: justify;\"><b>&#8220;All required fields mentioned in schema.xml must present for all &lt;doc&gt; element in file&#8221;.<\/b><br \/>\n<b><br \/>\n<\/b><\/div>\n<div style=\"text-align: justify;\">Let&#8217;s consider, If your <b>second<\/b> <b>&lt;doc&gt;&lt;\/doc&gt;<\/b> element <b>doesn&#8217;t full fill this restriction<\/b> then for the <b>first<\/b> <b>record<\/b>&nbsp;will be&nbsp;<b>updated<\/b>&nbsp;and then it do nothing with all other records in that file. i.e. after exception it stop reading your document, so be care full with your required fields and document provided to Apache Solr for data updation.&nbsp;&nbsp;<\/p>\n<p><b>How to post CSV data in form of a CSV file using post.jar file?<\/b><br \/>\nfirst create a CSV file at <b>\/example\/exampledocs\/ directory<\/b>&nbsp;using these records-<\/p>\n<p><span style=\"color: #660000; font-size: 14px;\">id,name,address,comments,popularity,counts,dynamicField_i<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">&#8220;Solr110&#8243;,&#8221;Solr 110&#8243;,&#8221;House No &#8211; 100, LR Apache&#8221;,&#8221;Apache Solr comment 1&#8243;,110,110,&#8221;dynamic solr 110&#8243;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">&#8220;Solr111&#8243;,&#8221;Solr 111&#8243;,&#8221;House No &#8211; 100, LR Apache&#8221;,&#8221;Apache Solr comment 1&#8243;,111,111,&#8221;dynamic solr 111&#8243;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">&#8220;Solr112&#8243;,&#8221;Solr 112&#8243;,&#8221;House No &#8211; 100, LR Apache&#8221;,&#8221;Apache Solr comment 1&#8243;,112,112,&#8221;dynamic solr 112&#8243;<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">&#8220;Solr113&#8243;,&#8221;Solr 113&#8243;,&#8221;House No &#8211; 100, LR Apache&#8221;,&#8221;Apache Solr comment 1&#8243;,113,113,&#8221;dynamic solr 113&#8243;<\/span><\/p>\n<div>&nbsp;<\/div>\n<div><b>save<\/b> this <b>file<\/b> as <b>dummy.csv<\/b> &#8211;<\/div>\n<div>\n<div>Go to <b>\/example\/exampledocs<\/b> directory using command prompt &amp; execute&nbsp;&nbsp;<\/p>\n<\/div>\n<div>&nbsp;<\/div>\n<\/div>\n<p><span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/csv -Dtype=text\/csv -jar post.jar dummy.csv<\/span><br \/>\n<span style=\"color: #660000;\"><br \/>\n<\/span>For multiple CSV files use &#8211;<br \/>\n<span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/csv -Dtype=text\/csv -jar post.jar dummy.csv<b>&nbsp;<\/b>dummy1.csv<\/span><br \/>\n<b><br \/>\n<\/b>For all&nbsp;CSV&nbsp;files present in working directory use-<br \/>\n<span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/csv -Dtype=text\/csv -jar post.jar *.csv<\/span><br \/>\n<span style=\"color: #660000;\"><br \/>\n<\/span>you will get on console a success message as &#8211;<br \/>\n<span style=\"color: #660000; font-size: 14px;\">SimplePostTool version 1.5<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">Posting files to base url http:\/\/localhost:8983\/solr\/update\/csv using content-type text\/csv..<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">POSTing file dummy.csv<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">1 files indexed.<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">COMMITting Solr index changes to http:\/\/localhost:8983\/solr\/update\/csv..<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">Time spent: 0:00:00.577<\/span><\/p>\n<div>&nbsp;<\/div>\n<p><span style=\"color: #660000;\">&nbsp;<\/span><\/p>\n<div>it means your data CSV document has been indexed in Apache Solr. just go to your dashboard screen<\/div>\n<div><b>select collection1 -&gt; query-&gt; Click on Execute Query Button<\/b><br \/>\nyour screen looks like-&nbsp;&nbsp;<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-dDHZiPODJf0\/U3w2pZCCpQI\/AAAAAAAAAns\/LFrGDdjaky4\/s1600\/csv.jpg\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-dDHZiPODJf0\/U3w2pZCCpQI\/AAAAAAAAAns\/LFrGDdjaky4\/s1600\/csv.jpg\"><\/a><\/div>\n<div style=\"clear: both; text-align: center;\">&nbsp;<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<p>Congrats your CSV document has been posted successfully.<\/p>\n<p><b>how to post&nbsp;JSON data in form of a JSON file using post.jar file?<\/b><br \/>\nfirst create a JSON file at <b>\/example\/exampledocs\/ directory&nbsp;<\/b>using these records<br \/>\n<span style=\"color: #660000; font-size: 14px;\">[{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;:&#8221;Solr115&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr 115&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;House No &#8211; 100, LR Apache, 40702&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;:&#8221;Apache Solr comment 1&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:115,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:115<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">},<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;:&#8221;Solr116&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr 116&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;House No &#8211; 100, LR Apache, 40702&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;:&#8221;Apache Solr comment 1&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:116,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:116<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">},<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">{<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;id&#8221;:&#8221;Solr117&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;name&#8221;:&#8221;Solr 117&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;address&#8221;:&#8221;House No &#8211; 100, LR Apache, 40702&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;comments&#8221;:&#8221;Apache Solr comment 1&#8243;,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;popularity&#8221;:117,<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"> &#8220;counts&#8221;:117<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">}]<\/span><\/p>\n<div>&nbsp;<\/div>\n<div><b>save<\/b> this <b>file<\/b> as <b>dummy.json<\/b> &#8211;<\/div>\n<div>\n<div>Go to <b>\/example\/exampledocs<\/b> directory using command prompt &amp; execute given command<\/div>\n<div>&nbsp;<\/div>\n<\/div>\n<p><span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/json -Dtype=application\/json -jar post.jar dummy.json<\/span><br \/>\nFor multiple JSON files use &#8211;<br \/>\n<span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/json -Dtype=application\/json -jar post.jar d1.json d2.json<\/span><br \/>\n<b><br \/>\n<\/b>For all&nbsp;JSON&nbsp;files present in working directory use-<br \/>\n<span style=\"color: #660000;\">java -Durl=http:\/\/localhost:8983\/solr\/update\/json -Dtype=application\/json -jar post.jar *.json<\/span><\/p>\n<div>&nbsp;<\/div>\n<p>you will get on console a success message as &#8211;<br \/>\n<span style=\"color: #660000; font-size: 14px;\">SimplePostTool version 1.5<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">Posting files to base url http:\/\/localhost:8983\/solr\/update\/json using content-type application\/json..<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">POSTing file dummy.json<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">1 files indexed.<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">COMMITting Solr index changes to http:\/\/localhost:8983\/solr\/update\/json..<\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\">Time spent: 0:00:00.535<\/span><\/p>\n<div>&nbsp;<\/div>\n<p>it means your data JSON document has been indexed in Apache Solr. just go to your dashboard screen<\/p>\n<div><b>select collection1 -&gt; query-&gt; Click on Execute Query Button<\/b><br \/>\nyour screen looks like-<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-dDHZiPODJf0\/U3w2pZCCpQI\/AAAAAAAAAns\/LFrGDdjaky4\/s1600\/csv.jpg\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-dDHZiPODJf0\/U3w2pZCCpQI\/AAAAAAAAAns\/LFrGDdjaky4\/s1600\/csv.jpg\"><\/a><\/div>\n<p>this post.jar file provides you some more parameters with <b>&lt;add&gt; <\/b>tag in XML file. I will discuss them in my later posts.<\/p>\n<p><b><span style=\"color: #660000;\">Namah Shivay<\/span><\/b><\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Happy Coding<\/strong><br \/>\n<strong>Namah Shivay<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last few post, I discussed about &#8220;Dashboard introduction &amp; how to post data on Apache Solr via it&#8217;s [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,148,151,149],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-csv-data-posting-on-solr-using-post-jar-file","category-json-data-posting-on-solr-using-post-jar-file","category-use-of-post-jar-file-in-apache-solr","category-xml-data-posting-on-solr-using-post-jar-file"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"og:description\" content=\"In my last few post, I discussed about &#8220;Dashboard introduction &amp; how to post data on Apache Solr via it&#8217;s [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\" \/>\n<meta property=\"og:site_name\" content=\"AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-21T08:16:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-17T08:00:41+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\" \/>\n<meta name=\"author\" content=\"Team Lhotse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team Lhotse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\"},\"author\":{\"name\":\"Team Lhotse\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\"},\"headline\":\"Using post.jar for posting JSON, CSV, XML data on Solr\",\"datePublished\":\"2014-05-21T08:16:00+00:00\",\"dateModified\":\"2020-01-17T08:00:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\"},\"wordCount\":1291,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\",\"articleSection\":[\"CSV data posting on Solr using post.jar file\",\"JSON data posting on Solr using post.jar file\",\"Use of post.jar file in Apache Solr\",\"XML data posting on Solr using post.jar file\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\",\"name\":\"Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\",\"datePublished\":\"2014-05-21T08:16:00+00:00\",\"dateModified\":\"2020-01-17T08:00:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage\",\"url\":\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\",\"contentUrl\":\"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lhotsetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using post.jar for posting JSON, CSV, XML data on Solr\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"name\":\"AEM Blog | Lhotse Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\",\"name\":\"AEM Blog | Lhotse Technologies\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"contentUrl\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"width\":539,\"height\":172,\"caption\":\"AEM Blog | Lhotse Technologies\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\",\"name\":\"Team Lhotse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Team Lhotse\"},\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/","og_locale":"en_US","og_type":"article","og_title":"Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies","og_description":"In my last few post, I discussed about &#8220;Dashboard introduction &amp; how to post data on Apache Solr via it&#8217;s [&hellip;]","og_url":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/","og_site_name":"AEM Blog | Lhotse Technologies","article_published_time":"2014-05-21T08:16:00+00:00","article_modified_time":"2020-01-17T08:00:41+00:00","og_image":[{"url":"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg","type":"","width":"","height":""}],"author":"Team Lhotse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team Lhotse","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#article","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/"},"author":{"name":"Team Lhotse","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d"},"headline":"Using post.jar for posting JSON, CSV, XML data on Solr","datePublished":"2014-05-21T08:16:00+00:00","dateModified":"2020-01-17T08:00:41+00:00","mainEntityOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/"},"wordCount":1291,"commentCount":0,"publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage"},"thumbnailUrl":"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg","articleSection":["CSV data posting on Solr using post.jar file","JSON data posting on Solr using post.jar file","Use of post.jar file in Apache Solr","XML data posting on Solr using post.jar file"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/","url":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/","name":"Using post.jar for posting JSON, CSV, XML data on Solr - AEM Blog | Lhotse Technologies","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage"},"thumbnailUrl":"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg","datePublished":"2014-05-21T08:16:00+00:00","dateModified":"2020-01-17T08:00:41+00:00","breadcrumb":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#primaryimage","url":"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg","contentUrl":"http:\/\/3.bp.blogspot.com\/-TM0N-OqkB98\/U3tW-6ZWmRI\/AAAAAAAAAnc\/0cDwZLclhBM\/s1600\/xmldata.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/lhotsetechnologies.com\/blog\/using-post-jar-for-posting-json-csv-xml-data-on-solr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lhotsetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using post.jar for posting JSON, CSV, XML data on Solr"}]},{"@type":"WebSite","@id":"https:\/\/lhotsetechnologies.com\/blog\/#website","url":"https:\/\/lhotsetechnologies.com\/blog\/","name":"AEM Blog | Lhotse Technologies","description":"","publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization","name":"AEM Blog | Lhotse Technologies","url":"https:\/\/lhotsetechnologies.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","contentUrl":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","width":539,"height":172,"caption":"AEM Blog | Lhotse Technologies"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d","name":"Team Lhotse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Team Lhotse"},"url":"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/"}]}},"_links":{"self":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":4,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/45\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}