You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by busbus <ba...@tcs.com> on 2009/09/15 16:26:22 UTC

How to create a new index file automatically

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.


Re: How to create a new index file automatically

Posted by busbus <ba...@tcs.com>.


> It can import documents in certain other formats using the 
> http://wiki.apache.org/solr/ExtractingRequestHandler
> 

1) According to my inference.Solr uses Apache Tikka to convert other rich
document format files to Text Files, so that the Class ExtractRequestHandler
use the output text file to create the Index files.

2. If Point 1 is correct,then I think this could suit my requirements since
I need to index rich documents files especially .xls format.
But i cant find the class ExtractRequestHandler which has to be configured
in SOLRCONFIG.xml file, so that i can import XLS documents through the
servlet

ttp://localhost:8983/solr/update/extract?=
-- 
View this message in context: http://www.nabble.com/How-to-create-a-new-index-file-automatically-tp25455045p25466714.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to create a new index file automatically

Posted by Chris Harris <ry...@gmail.com>.
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 <ba...@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.
>
>