Hi Daniel, So if I implement multiple dataimporthandler and do a full import, does Solr perform import of all handlers at once or can just specify which handler to import? Thank you
Yangrui On Tuesday, April 5, 2016, Davis, Daniel (NIH/NLM) [C] <daniel.da...@nih.gov> wrote: > If Shawn is correct, and you are using DIH, then I have done this by > implementing multiple requestHandlers each of them using Data Import > Handler, and have each specify a different XML file for the data config. > Instead of using data-config.xml, I've used a large number of files such as: > health-topics-conf.xml > encyclopedia-conf.xml > ... > I tend to index a single valued, required field named "source" that I can > use in the delete query, and I use the TemplateTranformer to make this easy: > > <entity name="topic" > ... > transformer="TemplateTransformer"> > <field column="source" template="health-topics" /> > ... > > Hope this helps, > > -Dan > > -----Original Message----- > From: Shawn Heisey [mailto:apa...@elyograg.org <javascript:;>] > Sent: Tuesday, April 05, 2016 10:50 AM > To: solr-user@lucene.apache.org <javascript:;> > Subject: Re: Multiple data-config.xml in one collection? > > On 4/5/2016 8:12 AM, Yangrui Guo wrote: > > I'm using Solr Cloud to index a number of databases. The problem is > > there is unknown number of databases and each database has its own > configuration. > > If I create a single collection for every database the query would > > eventually become insanely long. Is it possible to upload different > > config to zookeeper for each node in a single collection? > > Every shard replica (core) in a collection shares the same configuration, > which it gets from zookeeper. This is one of SolrCloud's guarantees, to > prevent problems found with old-style sharding when the configuration is > different on each machine. > > If you're using the dataimport handler, which you probably are since you > mentioned databases, you can parameterize pretty much everything in the DIH > config file so it comes from URL parameters on the full-import or > delta-import command. > > Below is a link to the DIH config that I'm using, redacted slightly. > I'm not running SolrCloud, but the same thing should work in cloud. It > should give you some idea of how to use variables in your config, set by > parameters on the URL. > > http://apaste.info/jtq > > Thanks, > Shawn > >