Re: different length/size of unique 'id' field value in a collection.

2017-05-23 Thread Rick Leir
Derek, If your algorithm is guaranteed to always provide unique id's then fine. I say incorrectly in that, after a few years in software development, I have seen bugs in the most careful code. A bug causing ID collisions could be hard to track down. Solr can generate unique ID's for you, and

Re: different length/size of unique 'id' field value in a collection.

2017-05-22 Thread Derek Poh
Hi Rick Myapologies I didnot make myself clearon the value of the fields. There are numbers. I used 'ts1', 'sup1' and 'pdt1' for simplicity and for ease of understanding instead of the actual numbers. You mentioned this design has the potential for (in error cases) concatenating id's

Re: different length/size of unique 'id' field value in a collection.

2017-05-22 Thread Rick Leir
On 2017-05-22 02:25 AM, Derek Poh wrote: Hi Due to the source data structure, I need to concatenate the values of 2 fields ('supplier_id' and 'product_id') to form the unique 'id' of each document. However there are cases where some documents only have 'supplier_id' field. This will result

different length/size of unique 'id' field value in a collection.

2017-05-22 Thread Derek Poh
Hi Due to the source data structure, I need to concatenate the values of 2 fields ('supplier_id' and 'product_id') to form the unique 'id' of each document. However there are cases where some documents only have 'supplier_id' field. This will result in some documents with a longer/larger 'id'