title: solr index java source files as text
body: <p>I want to upload lots of source files (say, <code>java</code>) to <code>solr</code> to allow indexed search on them.
  They should be posted as <strong>plain text files</strong>. </p>
  
  <p>No special parsing is required.
  When trying to upload one java file I get "Unknown Source" related error.</p>
  
  <pre><code>java.lang.NoClassDefFoundError: com/uwyn/jhighlight/renderer/XhtmlRendererFactory
  </code></pre>
  
  <p>When I rename the file adding <code>.txt</code> in the end, it is uploaded successfully.</p>
  
  <p>I have thousands of files to upload on a daily basis and need to keep original names.
  How do I tell solr to treat all files in the directory as <code>.txt</code>?
  Advanced thanks!</p>