thanks gora I got that...have to change in the DB itself...
On Fri, May 17, 2013 at 6:27 PM, Gora Mohanty <g...@mimirtech.com> wrote: > On 16 May 2013 19:11, Rohan Thakur <rohan.i...@gmail.com> wrote: > > 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. > [...] > > Sorry, was away from email. The last configuration that you posted > seemed fine, and as you say above things seem to work for you. > > What you are facing now is that documents where the product_id > is the same as the query_id are being overwritten, as they have the > same uniqueKey as far as Solr is concerned. Thus, Solr will update an > existing document rather than adding a new one. So, you have to > come up with a scheme that makes the IDs unique. There are various > ways of doing this depending on how your product_id/query_id are > set up. One way might be to make the 'id' field that is used as the > uniqueKey a string rather than an integer, and prefix 'P' for product_ids > and 'Q' for query_ids. > > Regards, > Gora >