lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Multitable import - uniqueKey
Date Mon, 03 Jun 2013 14:53:42 GMT
Same answer. Whether it is 2, 3, 10 or 1000 tables, you, the data architect 
must decide how to uniquely identify Solr documents. In general, when 
joining n tables, combine the n keys into one composite key. Either do it on 
the SQL query side, or with a Solr update request processor.

-- Jack Krupansky

-----Original Message----- 
From: Raheel Hasan
Sent: Monday, June 03, 2013 10:44 AM
Subject: Re: Multitable import - uniqueKey


Thanks for the replies. Actually, I had only a small confusion:

>From table_1 I got key_1; using this I join into table_2. But table_2 also
gave another key key_2 which is needed for joining with table_3.

So for Table1 and Table2 its obviously just fine... but what will happen
when table3 is also added? will the 3 tables be intact in terms of


On Mon, Jun 3, 2013 at 7:33 PM, Jack Krupansky 

> If the respective table IDs are not globally unique, then you (the
> developer) will have to supplement the raw ID with a prefix or suffix or
> other form of global ID (e.g., UUID) to assure that they are unique. You
> could just add the SQL table name as a prefix or suffix.
> The bottom line: What do you WANT the Solr key field to look like? I mean,
> YOU are the data architect, right? What requirements do you have? When 
> your
> Solr application users receive the key values in the responses to queries,
> what expectations do you expect to set for them?
> -- Jack Krupansky
> -----Original Message----- From: Raheel Hasan
> Sent: Monday, June 03, 2013 9:12 AM
> To:
> Subject: Multitable import - uniqueKey
> Hi,
> I am importing multiple table (by join) into solr using DIH. All is set,
> except for 1 confusion:
> what to do with "*<uniqueKey>*" in schema?
> When I had only 1 table, I had it fine. Now how to put 2 uniqueKeys (both
> from different table).
> For example:
> <uniqueKey>table1_id</**uniqueKey>
> <uniqueKey>table2_id</**uniqueKey>
> Will this work?
> --
> Regards,
> Raheel Hasan

Raheel Hasan 

View raw message