hi Mohanty

I tried what you suggested of using id as common field and changing the SQL
query to point to id
and using id as uniqueKey
it is working but now what it is doing is just keeping the id's that are
not same in both the tables and discarding the id's that are same in both
the tables....but this is not correct as both the product_id and query_id
has no relation as such both are representing separate things in each
tables.

regards
Rohan


On Thu, May 16, 2013 at 5:11 PM, Gora Mohanty <g...@mimirtech.com> wrote:

> On 16 May 2013 16:24, Rohan Thakur <rohan.i...@gmail.com> wrote:
> > hi
> >
> > I got the problem it is with the unique key defined in the schema.xml
> > if i difine it to be query_id then while indexing it says
> > missing mandatory key query_id which is not present in the root
> > entity(data-config.xml) which is indexing the product from the database
> > which has product_id as the unique key and when in schema I set
> product_id
> > as the unique key then it says missing mandatory key product_id which is
> > not present in the root entity(data-config.xml) which is indiexing the
> user
> > query from another table in the database which has user_id as the unique
> > key.
> >
> > how can I fix this thanks I want to index both the tables which are
> > basically unrelated that is does not have any *Common*  fields....
> [...]
>
> Fix it in the SELECT statement:
>   SELECT product_id as id,... for one entity, and
>   SELECT query_id as id,... in the other
> and use id as the uniqueKey for Solr.
>
> Regards,
> Gora
>

Reply via email to