# \[SOLVED\]: Bulk insert: Can't find the first document inserted

**URL:** <https://discuss.elastic.co/t/solved-bulk-insert-cant-find-the-first-document-inserted/51580>\
**Category:** Elasticsearch\
**Created:** [June 1, 2016, 3:16pm UTC](https://discuss.elastic.co/t/solved-bulk-insert-cant-find-the-first-document-inserted/51580 "2016-06-01T15:16:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TroyAndAbed](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@TroyAndAbed](https://discuss.elastic.co/u/TroyAndAbed)\
**Post date:** [June 1, 2016, 3:16pm UTC](https://discuss.elastic.co/t/solved-bulk-insert-cant-find-the-first-document-inserted/51580/1 "2016-06-01T15:16:57Z")

</div>

[SOLVED]  
Hi,

I'm trying to insert datas using the bulk function with PHP. But, each time, I can't find the first document.

When I print the response of the bulk I got:

> ```
> [index] => Array
> (
> [_index] => my_index
> [_type] => ﻿my_type
> [_id] => 1
> [_version] => 7
> [_shards] => Array
> (
> [total] => 2
> [successful] => 2
> [failed] => 0
> )
> 
> ```

> ```
> [status] => 200
> )
> 
> ```

And when i tried to search it:  
`GET /my_index/my_type/1`  
I get:

```
{
   "_index": "my_index",
   "_type": "my_type",
   "_id": "1",
   "found": false
}

```

What I don't understand also is that when the others document are indexed, **the status is 201** and not **200** like the first one. And i can find the others. Also the \_version is different for the first one than the others.

Complementary information:  
I use Elasticsearch 2.3.  
The bulk size is 1000.  
It's just the first one of all that i can't find, not the first of each bulk.  
I don't get errors in the log.

----UPDATE----  
I deleted the index and then reindexed my data. The status and version is the same as the other but i still can't find it after...

---UPDATE2----  
SOVLED There was a weird invisible special char at the start of my csv file, os the first one wasn't of the same type as the other...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:47pm UTC](https://discuss.elastic.co/t/solved-bulk-insert-cant-find-the-first-document-inserted/51580/2 "2017-07-05T22:47:10Z")

</div>

Closed on July 5, 2017, 10:47pm UTC


