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 Geek Gamer <ge...@gmail.com> on 2010/12/11 07:06:01 UTC

best way to configure DIH for multiple DBS

hi group,

I have multiple document types indexed on a single core solr instance and
each comes from a  different DB.
What is the best way to configure DIH to read each document type from
corresponding DB. AS far as i could find DIH does not honour multiple
document tags inside the data config.

Thanks in anticipation,
geek

Re: best way to configure DIH for multiple DBS

Posted by bbarani <bb...@gmail.com>.
Just to give you some more clarification.. you can create multiple database
config file (separate) to extract the data from different sources and add
the hardcoded identifier in SOLR select query corresponding to each source.

So you will have multiple data import handler committing the data in to same
index but with different hardcoded values.

Thanks,
Barani
-- 
View this message in context: http://lucene.472066.n3.nabble.com/best-way-to-configure-DIH-for-multiple-DBS-tp2067826p2067925.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: best way to configure DIH for multiple DBS

Posted by bbarani <bb...@gmail.com>.
I am not sure whether I understand your question properly.

If you are trying to get data from different database and dumping it to same
index file then you need to specify a way to retrieve a particular data back
from that XML (which actually contains the consolidated data from all Db's).

For doing this you can have some default attribute in your select query (in
DIH), something like select database1 as databaseName and also include all
the possible fields in schema (consolidate all possible fields in source in
a single schema file).

When you want to query the data from SOLR corresponding to particular
database you can pass the databaseName as filter criteria (which differs for
each source) and then add all other filter criteria as needed.

I am not sure whether this answers your question, just want to provide you
with some possible solution in terms of indexing datas from different DB's
in to same index :)

Thanks,
Barani
-- 
View this message in context: http://lucene.472066.n3.nabble.com/best-way-to-configure-DIH-for-multiple-DBS-tp2067826p2067918.html
Sent from the Solr - User mailing list archive at Nabble.com.