Re: Compound Primary Keys

2019-04-24 Thread Vivekanand
Thanks a lot. Appreciate the pointers about indexing engine vs database . I ended up using concatenating the fields to generate a key. On Wed, Apr 24, 2019 at 11:39 AM David Hastings < hastings.recurs...@gmail.com> wrote: > another thing to consider doing is just merge the two fields into the id

Re: Compound Primary Keys

2019-04-24 Thread David Hastings
another thing to consider doing is just merge the two fields into the id value: "id": "USER_RECORD_12334", since its a string. On Wed, Apr 24, 2019 at 2:35 PM Gus Heck wrote: > Hi Vivek > > Solr is not a database, nor should one try to use it as such. You'll need > to adjust your thinking some

Re: Compound Primary Keys

2019-04-24 Thread Gus Heck
Hi Vivek Solr is not a database, nor should one try to use it as such. You'll need to adjust your thinking some in order to make good use of Solr. In Solr there is normally an id field and it should be unique across EVERY document in the entire collection. Thus there's no concept of a primary key,

Re: Compound Primary Keys

2019-04-19 Thread Vivekanand
Thanks On Fri, Apr 19, 2019 at 7:58 PM Erick Erickson wrote: > Yep. There’s no euqivalent of an RDBMSs composite key in Solr OOB. > > > On Apr 19, 2019, at 4:28 PM, Vivekanand wrote: > > > > When you say roll your own , you mean , create a single field by > > concatenation so that the result is

Re: Compound Primary Keys

2019-04-19 Thread Erick Erickson
Yep. There’s no euqivalent of an RDBMSs composite key in Solr OOB. > On Apr 19, 2019, at 4:28 PM, Vivekanand wrote: > > When you say roll your own , you mean , create a single field by > concatenation so that the result is unique ? Like USER_RECORD_12334 ? > > On Friday, April 19, 2019, Erick E

Re: Compound Primary Keys

2019-04-19 Thread Vivekanand
When you say roll your own , you mean , create a single field by concatenation so that the result is unique ? Like USER_RECORD_12334 ? On Friday, April 19, 2019, Erick Erickson wrote: > Basically you have to roll your own. You could do this when you assemble > the document on the client or use a

Re: Compound Primary Keys

2019-04-19 Thread Erick Erickson
Basically you have to roll your own. You could do this when you assemble the document on the client or use an UpdateRequestProcessor. If the latter, by very, very sure you get it in the right place, specifically _before_ the doc is routed. But I’d just assemble it on the client when I created t

Compound Primary Keys

2019-04-19 Thread Vivekanand
Hello, I have a use case like below. *USE CASE* I have a document with fields like Id, Id_type, Field_1. Filed_2 2 sample messages will look like { "id": "12334", "id_type": "USER_RECORD", "field_1": null, "field_2": null } { "id": "31321", "id_type": "OWN

Compound Primary Keys

2019-04-19 Thread Vivekanand Sahay
Hello, I have a use case like below. USE CASE I have a document with fields like Id, Id_type, Field_1. Filed_2 2 sample messages will look like { "id": "12334", "id_type": "USER_RECORD", "field_1": null, "field_2": null } { "id": "31321", "id_type": "OWNER_RECORD", "field_1": n