{"id":770,"date":"2013-02-02T23:30:37","date_gmt":"2013-02-02T23:30:37","guid":{"rendered":"http:\/\/garysieling.com\/blog\/?p=770"},"modified":"2013-02-02T23:30:37","modified_gmt":"2013-02-02T23:30:37","slug":"solr-dataimporthandler-example-with-filedatasource","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/solr-dataimporthandler-example-with-filedatasource\/","title":{"rendered":"Solr DataImportHandler example with FileDataSource"},"content":{"rendered":"<p>This imports each line of a text file as a single document, probably about the simplest thing you can do. The schema has a single attribute, &#8220;name&#8221;, which is defined as a unique attribute.<\/p>\n<p>&lt;dataConfig&gt;<br \/>\n&lt;dataSource name=&#8221;ds1&#8243; type=&#8221;FileDataSource&#8221; \/&gt;<br \/>\n&lt;document&gt;<br \/>\n&lt;entity name=&#8221;entity&#8221;<br \/>\nprocessor=&#8221;LineEntityProcessor&#8221;<br \/>\nurl=&#8221;E:\/Projects\/Data\/wlist_all\/wlist_match10.txt&#8221;<br \/>\ndataSource=&#8221;ds1&#8243;&gt;<br \/>\n&lt;field column=&#8221;rawLine&#8221; name=&#8221;name&#8221; \/&gt;<br \/>\n&lt;\/entity&gt;<br \/>\n&lt;\/document&gt;<br \/>\n&lt;\/dataConfig&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This imports each line of a text file as a single document, probably about the simplest thing you can do. The schema has a single attribute, &#8220;name&#8221;, which is defined as a unique attribute. &lt;dataConfig&gt; &lt;dataSource name=&#8221;ds1&#8243; type=&#8221;FileDataSource&#8221; \/&gt; &lt;document&gt; &lt;entity name=&#8221;entity&#8221; processor=&#8221;LineEntityProcessor&#8221; url=&#8221;E:\/Projects\/Data\/wlist_all\/wlist_match10.txt&#8221; dataSource=&#8221;ds1&#8243;&gt; &lt;field column=&#8221;rawLine&#8221; name=&#8221;name&#8221; \/&gt; &lt;\/entity&gt; &lt;\/document&gt; &lt;\/dataConfig&gt;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[300,517],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/770"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/770\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}