lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: uniqueKey not enforced
Date Mon, 22 Oct 2012 12:08:53 GMT
Which release of Solr?

Is this a single node Solr or distributed or cloud?

Is is possible that you added documents with the "overwrite="false"" 
attribute? That would suppress the uniqueness test.

Is it possible that you added those documents before adding the uniqueKey 
element to your schema, or added uniqueKey but did not restart Solr before 
adding those documents?

One minor difference from the Solr example schema is that your id field does 
not have "required="true"". I don't think that should matter (Solr will 
force the uniqueKey field to be required in documents), but I am curious how 
you managed to get an id field different from the Solr example.

-- Jack Krupansky

-----Original Message----- 
From: Robert Krüger
Sent: Monday, October 22, 2012 5:56 AM
Subject: uniqueKey not enforced


I noticed a duplicate entry in my index and I am wondering how that
can be, because I have a uniqueKey defined.

I have the following defined in my schema.xml:

<?xml version="1.0" ?>

<schema name="main core" version="1.1">
   <fieldtype name="string"  class="solr.StrField"
sortMissingLast="true" omitNorms="true"/>
.... other field types omitted here ...


  <!-- general -->
  <!-- id computed as a combination of media id and path -->
  <field name="id"   type="string"   indexed="true"  stored="true"
multiValued="false" />
.... other fields omitted here ...


<!-- field to use to determine and enforce document uniqueness. -->

<!-- field for the QueryParser to use when an explicit fieldname is 
absent -->

<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="OR"/>

And now I have two records which both have the value
"4b34b883-a9d9-428a-92c3-ba1a69d96a70:/Düsendrögl" in its id field. Is
it the Non-ASCII chars that cause the uniqueness enforcement to fail?

I am using Solr 3.6.1.

Any ideas what's going on?



View raw message