lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Tagore <sandeep.tag...@gmail.com>
Subject Re: Indexing and searching of sharded/ partitioned databases and tables
Date Wed, 07 Oct 2009 11:39:08 GMT

Hi Jayant,
You can use Solr to achieve your objective.
The data-config.xml which you posted is incomplete.

I would like to suggest you a way to index the full data.
Try to index a database at a time. Sample xml conf.....

<dataSource type="JdbcDataSource" name="ds1" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/Db1" user="user-name" password="password" />
 <document name="Tbl1">
   <entity name="Tbl1" query="select id,name,category from Tbl1">
            <field column="id" name="id" />
            <field column="name" name="name" />
            <field column="category" name="category" />
</entity></document>
<document name="Tbl2">
   <entity name="Tbl2" query="select id,name,category from Tbl2">
            <field column="id" name="id" />
            <field column="name" name="name" />
            <field column="category" name="category" />
</entity></document>
<document name="Tbl3">
   <entity name="Tbl3" query="select id,name,category from Tbl3">
            <field column="id" name="id" />
            <field column="name" name="name" />
            <field column="category" name="category" />
</entity></document>

You can write an automated program which will change the DB conf details in
that xml and fire the full import command. You can use
http://localhost:8983/solr/dataimport url to check the status of the data
import.

But be careful while declaring the <uniqueKey> field. Make sure that you are
not overwriting the records.
And if you are working on large data sets, you can use Solr Sharding
concept.

Let us know if you have any issues.

Regards,
Sandeep Tagore
-- 
View this message in context: http://www.nabble.com/Indexing-and-searching-of-sharded--partitioned-databases-and-tables-tp25782544p25783916.html
Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message