You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jason Toy <ja...@gmail.com> on 2011/10/04 23:59:07 UTC
composite Unique Keys?
I have several different document types that I store. I use a serialized
integer that is unique to the document type. If I use id as the uniqueKey,
then there is a possibility to have colliding docs on the id, what would be
the best way to have a unique id given I am storing my unique identifier in
an integer field? I've seen other solutions where the unique is consists of
"DocTypeString 123245" as the id which seems pretty inefficient to me.
RE: composite Unique Keys?
Posted by "Jaeger, Jay - DOT" <Ja...@dot.wi.gov>.
We generated our own concatenated key (original customer, who may historically have different addresses, etc.). If there is a way for Solr to do that automatigically, I'd love to hear about it.
I don't think that the extra bytes for the key itself (String vs. binary integer) is all that much of a consideration unless you have billions of "documents".
JRJ
-----Original Message-----
From: Jason Toy [mailto:jasontoy@gmail.com]
Sent: Tuesday, October 04, 2011 4:59 PM
To: solr-user@lucene.apache.org
Subject: composite Unique Keys?
I have several different document types that I store. I use a serialized
integer that is unique to the document type. If I use id as the uniqueKey,
then there is a possibility to have colliding docs on the id, what would be
the best way to have a unique id given I am storing my unique identifier in
an integer field? I've seen other solutions where the unique is consists of
"DocTypeString 123245" as the id which seems pretty inefficient to me.