You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by L Duperval <du...@videotron.com> on 2010/07/22 19:07:40 UTC

Inserting data from multiple databases in same index

Hi,

We are creating an index containing data from two databases. What we are trying
to achieve is to make our search locate and return information no matter where
the data came from. (BTW, we are using Compass, if it matters any)

My problem is that I am not sure how to create such an index.

Do I index in two passes, one for each database, while adding the content of the
second SELECT to the first one? Or a different approach?

I'm pretty sure this is (pretty much) a FAQ but I didn't find what I was looking
for.

Thanks,

L



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Inserting data from multiple databases in same index

Posted by Chris Lu <ch...@gmail.com>.
You can either
1) create one index for each database, and merge the results during search.
2) create the 2 indexes individually and merge them
3) merge records during SQL select.

The 1) approach should be easy to scale linearly as your database grows.
You can even distribute the indexes onto several boxes and achieve 
sharded search.

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes: 
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
DBSight customer, a shopping comparison site, (anonymous per request) 
got 2.6 Million Euro funding!

On 7/22/2010 10:07 AM, L Duperval wrote:
> Hi,
>
> We are creating an index containing data from two databases. What we are trying
> to achieve is to make our search locate and return information no matter where
> the data came from. (BTW, we are using Compass, if it matters any)
>
> My problem is that I am not sure how to create such an index.
>
> Do I index in two passes, one for each database, while adding the content of the
> second SELECT to the first one? Or a different approach?
>
> I'm pretty sure this is (pretty much) a FAQ but I didn't find what I was looking
> for.
>
> Thanks,
>
> L
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org