I have almost 250 XML data files (one file contain 1000 pairs of xml formatted data) and i have one elasticsearch server. My application build on Ruby on Rails platform. I know how to do index on Model in rails application (ModelName.import) which will do indexes on elasticsearch server.
But is there other way that we can directly do indexing using XML data files on elasticsearch server instead of using .import method?
XML file looks like (XML file may contain 1000 item per file),
<?xml version="1.0" encoding="UTF-8"?>
<catalog items="2" total-pages="260" page="1" per-page="2" status="complete">
<item>
<sku>1</sku>
<vbid>1</vbid>
<created>Sun, 05 Oct 2014 03:35:58 +0000</created>
<updated>Sun, 06 Mar 2016 12:44:48 +0000</updated>
<subjects>
<subject schema="bisac" code="HIS027090">World War I</subject>
<subject schema="coursesmart" code="cs.soc_sci.hist.milit_hist">Social Sciences -> History -> Military History</subject>
</subjects>
<aliases>
<eisbn-canonical>1</eisbn-canonical>
<isbn-canonical>1</isbn-canonical>
<print-isbn-canonical>9780752460864</print-isbn-canonical>
<fpid/>
<isbn13>1</isbn13>
<isbn10>0750951796</isbn10>
<additional-isbns>
<isbn type="print-isbn-10">0752460862</isbn>
<isbn type="print-isbn-13">9780752460864</isbn>
</additional-isbns>
</aliases>
</item>
<item>
<sku>2</sku>
<vbid>2</vbid>
<created>Sun, 05 Oct 2014 03:35:58 +0000</created>
<updated>Sun, 06 Mar 2016 12:44:48 +0000</updated>
<subjects>
<subject schema="bisac" code="HIS027090">World War I</subject>
<subject schema="coursesmart" code="cs.soc_sci.hist.milit_hist">Social Sciences -> History -> Military History</subject>
</subjects>
<aliases>
<eisbn-canonical>2</eisbn-canonical>
<isbn-canonical>2</isbn-canonical>
<print-isbn-canonical>9780752460864</print-isbn-canonical>
<fpid/>
<isbn13>2</isbn13>
<isbn10>0750951796</isbn10>
<additional-isbns>
<isbn type="print-isbn-10">0752460862</isbn>
<isbn type="print-isbn-13">9780752460864</isbn>
</additional-isbns>
</aliases>
</item>
</catalog>