|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
specify multiple files in <lst> for DataImportHandler<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> is there a way to list more than one files in the <lst> above configuration? I understand I can have multiple <entity> itself in the config but I need to keep two data-config files separate and still use same DIH to create one index. |
|
|
Re: specify multiple files in <lst> for DataImportHandlerYou can set up multiple request handlers each with their own configuration
file. For example, in addition to the config you listed you could add something like this: <requestHandler name="/dataimport-two" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-two-config.xml</str> </lst> </requestHandler> and so on with as many handlers as you need. -Jay http://www.lucidimagination.com On Thu, Nov 5, 2009 at 8:57 AM, javaxmlsoapdev <vikasdp@...> wrote: > > <requestHandler name="/dataimport" > class="org.apache.solr.handler.dataimport.DataImportHandler"> > <lst name="defaults"> > <str name="config">data-config.xml</str> > </lst> > </requestHandler> > > is there a way to list more than one files in the <lst> above > configuration? > I understand I can have multiple <entity> itself in the config but I need > to > keep two data-config files separate and still use same DIH to create one > index. > -- > View this message in context: > http://old.nabble.com/specify-multiple-files-in-%3Clst%3E-for-DataImportHandler-tp26215805p26215805.html > Sent from the Solr - User mailing list archive at Nabble.com. > > |
|
|
Re: specify multiple files in <lst> for DataImportHandlerWouldn't this create (or require to create) new index if I have multiple config files. can I keep same names for <dataSource> & <document> in both config files. will that avoid creating two indexes? I want to just create one index but still keep config files separate. Any idea?
|
|
|
Re: specify multiple files in <lst> for DataImportHandlerNo, it doesn't require separate indexes, nor will it create a new index.
Think of it as multiple inputs into the same index. Yes you can set up the same datasource in separate configs, and you could name each <document> the same if you wished, but it's not necessary. You might need to use the parameter "&clean=false" when running a full-import. I think it defaults to "true", which is a little bit risky - all data in the index will be deleted before a full-import. The best thing would be to try some simple tests and then you'll see that it's pretty straightforward. -Jay http://www.lucidimagination.com On Fri, Nov 6, 2009 at 6:34 AM, javaxmlsoapdev <vikasdp@...> wrote: > > Wouldn't this create (or require to create) new index if I have multiple > config files. can I keep same names for <dataSource> & <document> in both > config files. will that avoid creating two indexes? I want to just create > one index but still keep config files separate. Any idea? > > Jay Hill wrote: > > > > You can set up multiple request handlers each with their own > configuration > > file. For example, in addition to the config you listed you could add > > something like this: > > > > <requestHandler name="/dataimport-two" > > class="org.apache.solr.handler.dataimport.DataImportHandler"> > > <lst name="defaults"> > > <str name="config">data-two-config.xml</str> > > </lst> > > </requestHandler> > > > > and so on with as many handlers as you need. > > > > -Jay > > http://www.lucidimagination.com > > > > > > On Thu, Nov 5, 2009 at 8:57 AM, javaxmlsoapdev <vikasdp@...> > wrote: > > > >> > >> <requestHandler name="/dataimport" > >> class="org.apache.solr.handler.dataimport.DataImportHandler"> > >> <lst name="defaults"> > >> <str name="config">data-config.xml</str> > >> </lst> > >> </requestHandler> > >> > >> is there a way to list more than one files in the <lst> above > >> configuration? > >> I understand I can have multiple <entity> itself in the config but I > need > >> to > >> keep two data-config files separate and still use same DIH to create one > >> index. > >> -- > >> View this message in context: > >> > http://old.nabble.com/specify-multiple-files-in-%3Clst%3E-for-DataImportHandler-tp26215805p26215805.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://old.nabble.com/specify-multiple-files-in-%3Clst%3E-for-DataImportHandler-tp26215805p26230781.html > Sent from the Solr - User mailing list archive at Nabble.com. > > |
| Free embeddable forum powered by Nabble | Forum Help |