Hello! Ahmet as far as I know Solr wont throw that exception if you remove the required="true" attribute. At least some work around for now.
-- Regards, Rafał Kuć Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch > Hi all, > I was following > http://wiki.apache.org/solr/UniqueKey#UUID_techniques to setup uuid > as my uniqueKey. (recent solr-trunk) > <fieldType name="uuid" class="solr.UUIDField" indexed="true" /> > <field name="uniqueKey" type="uuid" indexed="true" stored="true" > default="NEW" required="true" /> > <uniqueKey>uniqueKey</uniqueKey> > I get the following exception. > SEVERE: null:org.apache.solr.common.SolrException: uniqueKey field > (null) can not be configured with a default value (NEW) > at > org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:496) > at > org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:113) > at > org.apache.solr.core.CoreContainer.create(CoreContainer.java:851) > at > org.apache.solr.core.CoreContainer.load(CoreContainer.java:539) > I made this working by adding some if checks to IndexSchema.java and > UpdateCommand.java. > getType().getClass().getName().equals(UUIDField.class.getName() > But I am not sure if this is preferred way. How can I use uuid as > my uniqueKey without source code modification? > Thanks, > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org -- Regards, Rafał Kuć Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org