title: Getting started with Solr
body: <p>I'm trying to get started with Apache Solr, but some things are not clear to me. Reading through the <a href="http://lucene.apache.org/solr/tutorial.html" rel="nofollow noreferrer">tutorial</a>, I've set up a running Solr instance. What I find confusing is that all the configuration of Solr (schemas and so on) are in XML format. When they add sample data, it's shows how to add xml documents (<code>java -jar post.jar solr.xml monitor.xml</code>). Is it just a bad choice of sample format? I mean, are they uploading data describing documents, or the actual documents they're adding are .xml files?</p>
  
  <p>I'm trying to add some books in .txt format, so if I use <code>java -jar post.jar mydoc.txt</code>, am I adding it? How could I add this document <em>and</em> metadata (author, title) about it?</p>
  
  <p>That said, I tried to set up a simple Html page to post documents to Solr:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
    &lt;form action="http://localhost:8983/solr/update?commit=true" enctype="multipart/form-data" method="post"&gt;
      &lt;input type="file"&gt;
      &lt;input type="submit" value="Send"&gt;
    &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I try to post a file, I get this response:</p>
  
  <pre><code>&lt;response&gt;
    &lt;lst name="responseHeader"&gt;
      &lt;int name="status"&gt;0&lt;/int&gt;
      &lt;int name="QTime"&gt;26&lt;/int&gt;
    &lt;/lst&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>Is this correct? Does it mean that I've successfully added my file? If so, one of the words in the file, for example is "montagna" (this is an italian book, montagna means mountain...). If i visit the url</p>
  
  <pre><code>http://localhost:8983/solr/select/?q=montagna&amp;start=0&amp;rows=10&amp;indent=on
  </code></pre>
  
  <p>I expect something to be returned (the whole text maybe, or some info about the file), but this is what I get:</p>
  
  <pre><code>&lt;response&gt;
    &lt;lst name="responseHeader"&gt;
      &lt;int name="status"&gt;0&lt;/int&gt;
        &lt;int name="QTime"&gt;1&lt;/int&gt;
        &lt;lst name="params"&gt;
          &lt;str name="indent"&gt;on&lt;/str&gt;
          &lt;str name="start"&gt;0&lt;/str&gt;
          &lt;str name="q"&gt;montagna&lt;/str&gt;
          &lt;str name="rows"&gt;10&lt;/str&gt;
      &lt;/lst&gt;
    &lt;/lst&gt;
    &lt;result name="response" numFound="0" start="0"/&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>Doesn't seem like a match to me. Also, according <a href="https://stackoverflow.com/a/9156872/42636">to this answer</a>, I should be able to get back the text surrounding the matches with <code>hl.fragsize</code>. How do I integrate this in the search string? Thank you </p>