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 Hyttinen Lauri <la...@stat.fi> on 2012/01/10 13:20:49 UTC

Two documents with same ID but different hash

Hello,

I sent some data into the solr/lucene index but when I query
the data I see weird results.

There are documents with identical id fields but they have different 
hash values.
Apart from the hash values the results are the same.

I thought it was impossible to have documents with same uniqueKey in the 
index?
Evidently this is not the case? Could the index be corrupt somehow?

from schema.xml:
<uniqueKey>id</uniqueKey>


Best regards,
Lauri Hyttinen

Re: Two documents with same ID but different hash

Posted by Hyttinen Lauri <la...@stat.fi>.
Hello again,

Well after further review the ID's are different. The difference was 
just so small I missed it after staring it for a few hours.

BR,
Lauri

On 01/10/2012 02:20 PM, Hyttinen Lauri wrote:
> Hello,
>
> I sent some data into the solr/lucene index but when I query
> the data I see weird results.
>
> There are documents with identical id fields but they have different 
> hash values.
> Apart from the hash values the results are the same.
>
> I thought it was impossible to have documents with same uniqueKey in 
> the index?
> Evidently this is not the case? Could the index be corrupt somehow?
>
> from schema.xml:
> <uniqueKey>id</uniqueKey>
>
>
> Best regards,
> Lauri Hyttinen

Re: Two documents with same ID but different hash

Posted by Erick Erickson <er...@gmail.com>.
I have no idea what you mean by "different hash", and you
haven't provided much information go on here.

What is your evidence that the document is in the index
twice? If you're inspecting the index at a low level
that's expected, since documents are just marked
as deleted not immediately removed from the index.

Are you using shards? If so, is it possible that you've indexed
documents with the same ID to different shards?

Best
Erick

On Tue, Jan 10, 2012 at 7:20 AM, Hyttinen Lauri <la...@stat.fi> wrote:
> Hello,
>
> I sent some data into the solr/lucene index but when I query
> the data I see weird results.
>
> There are documents with identical id fields but they have different hash
> values.
> Apart from the hash values the results are the same.
>
> I thought it was impossible to have documents with same uniqueKey in the
> index?
> Evidently this is not the case? Could the index be corrupt somehow?
>
> from schema.xml:
> <uniqueKey>id</uniqueKey>
>
>
> Best regards,
> Lauri Hyttinen