<uniqueKey> - uniqueness not enforced?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

<uniqueKey> - uniqueness not enforced?

Fuad Efendi
Hi,
I was adding new documents with same Id in a hope that it will replace  
old one; instead, new document added with same Id. Is it bug?
Thanks

Reply | Threaded
Open this post in threaded view
|

Re: <uniqueKey> - uniqueness not enforced?

Yonik Seeley-2
On Mon, Jul 14, 2008 at 10:01 AM, Fuad Efendi <[hidden email]> wrote:
> I was adding new documents with same Id in a hope that it will replace old
> one; instead, new document added with same Id. Is it bug?

It should work fine.
It might be a schema issue for you... try the solr example setup.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: <uniqueKey> - uniqueness not enforced?

Fuad Efendi
I verified, I use same field definitions:
<field name="id" type="string" indexed="true" stored="true" required="true" />
<uniqueKey>id</uniqueKey>

1.3 development version taken from SVN few months ago.

I use SOLRJ add(Collection<SolrInputDocument> docs, some docs could  
have same Id.

I'll double-check...
Thanks


>> I was adding new documents with same Id in a hope that it will replace old
>> one; instead, new document added with same Id. Is it bug?
>
> It should work fine.
> It might be a schema issue for you... try the solr example setup.
>
> -Yonik
>