title: Indexing an XML file in Apache Solr
body: <p>I am very new to Solr. I have been through the post (<a href="https://stackoverflow.com/questions/8858856/need-help-indexing-xml-files-into-solr-using-dataimporthandler">Need help indexing XML files into Solr using DataImportHandler</a>) before putting this question. However it didnt help because I am very new to Apache Solr. I am looking to index an xml file and search its contents. Its structure resembles something like this</p>
  
  <pre><code>&lt;entry id="REACT_142474" acc="REACT_142474.5"&gt;
  &lt;name&gt;((1,6)-alpha-glucosyl)poly((1,4)-alpha-glucosyl)glycogenin =&amp;gt; poly{(1,4)-alpha-      glucosyl} glycogenin + alpha-D-glucose&lt;/name&gt;
  &lt;description&gt;This event has been computationally inferred from an event that has been demonstrated in another species.The inference is based on the homology mapping in Ensembl Compara. Briefly, reactions for which all involved PhysicalEntities (in input, output and catalyst) have a mapped orthologue/paralogue (for complexes at least 75% of components must have a mapping) are inferred to the other species. High level events are also inferred for these events to allow for easier navigation.More details and caveats of the event inference in Reactome. For details on the Ensembl Compara system see also: Gene orthology/paralogy prediction method.&lt;/description&gt;
  &lt;dates&gt;
  &lt;date type="creation" value="06-JUN-2013"/&gt;
  &lt;date type="last_modification" value="06-JUN-2013"/&gt;
  &lt;/dates&gt;
  &lt;cross_references&gt;
  &lt;ref dbname="ChEBI" dbkey="17925"/&gt;
  &lt;ref dbname="UniProt" dbkey="Q06625"/&gt;
  &lt;ref dbname="ChEBI" dbkey="18291"/&gt;
  &lt;ref dbname="UniProt" dbkey="P47011"/&gt;
  &lt;ref dbname="UniProt" dbkey="P36143"/&gt;
  &lt;ref dbname="GO" dbkey="GO:0004135"/&gt;
  &lt;ref dbname="taxonomy" dbkey="4932"/&gt;
  &lt;/cross_references&gt;
  &lt;additional_fields&gt;
  &lt;field name="organism"&gt;Saccharomyces cerevisiae&lt;/field&gt;
  &lt;/additional_fields&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p>Is it essential to use the DIH to import this data into Solr? Isn't there any simpler way to accomplish the task? Can it be done through SolrJ as I am fine with outputting the result through the console too. It would be really helpful if someone could point me to some useful examples or resources on this apart from the official documentation.</p>