There are a few different ways to get data into Solr. XML is one way, and probably the most common. As far as Solr is concerned it doesn't matter whether you construct XML input by hand or write some kind of code to do it. Solr won't automatically create any files like the example .xml files for you, though, nor would it make all that much sense for it to do so.
For testing it's fine to use the post.jar script like you're doing, but most people are probably not going to do this in production; rather they'll submit the XML to Solr with an HTTP POST from some indexing process. The format for the XML files is described at http://wiki.apache.org/solr/UpdateXmlMessages If you're doing an HTTP POST, the URL to post to will be something like http://<hostname>:<port>/solr/update Solr can also accept input in CSV format. Or it can import data from your Sql database using http://wiki.apache.org/solr/DataImportHandler It can import documents in certain other formats using the http://wiki.apache.org/solr/ExtractingRequestHandler Note: I'm not sure if you understand, from your message, that you're going to have to create a schema for your data at some point. The "example" directory contains an example schema, but it probably won't be suitable for your application. See http://wiki.apache.org/solr/SchemaXml 2009/9/15 busbus <balaji.send...@tcs.com>: > > Hi all, > > I am newbie to Solr. > > I have downloaded and used the solr example and I have a basic doubt. > > There are some xml documents present in > apache-solr-1.3.0\example\exampledocs. > These are the input files to solr index and I found that by giving this > command > > java –jar post.jar *.xml > > . All these xml documents have basic structure schema. > > Say for example > > <add> > <doc> > <field name= “ “> abc </field> > … > …. > > </doc> > </add> > > I want to index some more files. Then in that case should I have to create a > new xml file manually or what should I do to create it automatically. > > Please give me a solution. I am very new to Solr and so please make it as > simple as possible. > > Thanks a lot... > > -- > View this message in context: > http://www.nabble.com/How-to-create-a-new-index-file-automatically-tp25455045p25455045.html > Sent from the Solr - User mailing list archive at Nabble.com. > >