Re: Different ids for the same document in different replicas.

2014-11-13 Thread Erick Erickson
bq: can this be used as an unique value instead of generating the hashcode for the urlField Don't do this. The _version_ field is used internally for optimistic locking etc. I'd be _very_ cautious about co-opting this for anything else. Best, Erick On Thu, Nov 13, 2014 at 8:14 AM, Meraj A. Khan

Re: Different ids for the same document in different replicas.

2014-11-13 Thread Meraj A. Khan
Thanks , I also noticed that the mandatory _version_ field is also uniquely generated for every document in the collection , can this be used as an unique value instead of generating the hashcode for the urlField. I want to avoid creation of a custom unique filed if _version_ field which is mandat

Re: Different ids for the same document in different replicas.

2014-11-13 Thread Garth Grimm
OK. So it sounds like doctorURL is a good key, but you don’t like the special characters. I’ve used MD5 hashes of URLs before as a way to convert unique URLs into unique alphanumeric strings in a repeatable way. I think most programming languages contain libraries for doing that as you feed t

Re: Different ids for the same document in different replicas.

2014-11-12 Thread Meraj A. Khan
Sorry,its actually doctorUrl, so I dont want to use doctorUrl as a lookup mechanism because urls can have special characters that can caise issue with Solr lookup. I guess I should rephrase my question to ,how to auto generate the unique keys in the id field when using SolrCloud? On Nov 12, 2014

Re: Different ids for the same document in different replicas.

2014-11-12 Thread Garth Grimm
You mention you already have a unique Key identified for the data you’re storing in Solr: > doctorId If that’s the field you’re using to uniquely identify each thing you’re storing in the solr index, why do you want to have an id field that is populated with some random value? You’ll be using

Re: Different ids for the same document in different replicas.

2014-11-12 Thread S.L
Just tried adding id while keeping id type= "string" only blank ids are being generated ,looks like the id is being auto generated only if the the id is set to type uuid , but in case of SolrCloud this id will be unique per replica. Is there a way to generate a unique id both in case of SolrCl

Re: Different ids for the same document in different replicas.

2014-11-12 Thread S.L
Thanks. So the issue here is I already have a doctorId defined in my schema.xml. If along with that I also want the field to be automatically generated for each document do I have to declare it as a as well , because I just tried the following setting without the uniqueKey for id and its only g

Re: Different ids for the same document in different replicas.

2014-11-11 Thread Garth Grimm
Looking a little deeper, I did find this about UUIDField http://lucene.apache.org/solr/4_9_0/solr-core/org/apache/solr/schema/UUIDField.html "NOTE: Configuring a UUIDField instance with a default value of "NEW" is not advisable for most users when using SolrCloud (and not possible if the UUID v

Re: Different ids for the same document in different replicas.

2014-11-11 Thread Garth Grimm
“uuid” isn’t an out of the box field type that I’m familiar with. Generally, I’d stick with the out of the box advice of the schema.xml file, which includes things like…. and… id If you’re creating some key/value pair with uuid as the key as you feed documents in, and you know

Different ids for the same document in different replicas.

2014-11-11 Thread S.L
Hi All, I am seeing interesting behavior on the replicas , I have a single shard and 6 replicas and on SolrCloud 4.10.1 . I only have a small number of documents ~375 that are replicated across the six replicas . The interesting thing is that the same document has a different id in each one of