Multiple documents with the same _id

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple documents with the same _id

David Smith-2
We're using elasticsearch 1.4.0 and we index documents using bulk indexing from node client. 

We seem to be getting quite a few duplicates as elasticsearch doesn't seem to recognize that there are already documents with the same _id.

GET /searchables/_search
{
    "from": 0,
    "size": 100,
    "query": {
      "ids": {
        "values": ["7373180"]
      }
    
   },
   "_source": "false", 
   "fielddata_fields": [ "_timestamp"]
}


{
   "took": 299,
   "timed_out": false,
   "_shards": {
      "total": 8,
      "successful": 8,
      "failed": 0
   },
   "hits": {
      "total": 2,
      "max_score": 1,
      "hits": [
         {
            "_index": "searchables-1426610789546",
            "_type": "user",
            "_id": "7373180",
            "_score": 1,
            "fields": {
               "_timestamp": 1432446458000
            }
         },
         {
            "_index": "searchables-1426610789546",
            "_type": "user",
            "_id": "7373180",
            "_score": 1,
            "fields": {
               "_timestamp": 1426612089000
            }
         }
      ]
   }
}

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/519a6432-202d-40b6-b4b3-eaea70687917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple documents with the same _id

vineeth mohan-2
Hello David , 

Very interesting finding.

As i see the only way for this to happen is to index the same document ID with different routing keys or parent ID's even.
Have anything of these have happened while indexing ? 


Thanks
           Vineeth Mohan,
           Elasticsearch consultant,



On Fri, Jun 26, 2015 at 7:40 PM, David Smith <[hidden email]> wrote:
We're using elasticsearch 1.4.0 and we index documents using bulk indexing from node client. 

We seem to be getting quite a few duplicates as elasticsearch doesn't seem to recognize that there are already documents with the same _id.

GET /searchables/_search
{
    "from": 0,
    "size": 100,
    "query": {
      "ids": {
        "values": ["7373180"]
      }
    
   },
   "_source": "false", 
   "fielddata_fields": [ "_timestamp"]
}


{
   "took": 299,
   "timed_out": false,
   "_shards": {
      "total": 8,
      "successful": 8,
      "failed": 0
   },
   "hits": {
      "total": 2,
      "max_score": 1,
      "hits": [
         {
            "_index": "searchables-1426610789546",
            "_type": "user",
            "_id": "7373180",
            "_score": 1,
            "fields": {
               "_timestamp": 1432446458000
            }
         },
         {
            "_index": "searchables-1426610789546",
            "_type": "user",
            "_id": "7373180",
            "_score": 1,
            "fields": {
               "_timestamp": 1426612089000
            }
         }
      ]
   }
}

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/519a6432-202d-40b6-b4b3-eaea70687917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D83BUHH%3DhYmd1qbVkpHDriCBPW_hBvuTp4174nNqvrnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.