# Récupération des données cacher

**URL:** <https://discuss.elastic.co/t/recuperation-des-donnees-cacher/33453>\
**Category:** Discussions en français\
**Created:** [November 1, 2015, 1:19am UTC](https://discuss.elastic.co/t/recuperation-des-donnees-cacher/33453 "2015-11-01T01:19:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryodo](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@ryodo](https://discuss.elastic.co/u/ryodo)\
**Post date:** [November 1, 2015, 1:19am UTC](https://discuss.elastic.co/t/recuperation-des-donnees-cacher/33453/1 "2015-11-01T01:19:12Z")

</div>

Bonjour,

J'ai une base de données qui contient 57 M de données je les passer dans elastic via ce code

```
$search_host = '127.0.0.1';
$search_port = '9200';
$index = 'myindex1';
$doc_type = 'tweecoms1';
//hada reste static f 1M
$combien=1000000;
$limit=$_GET['l'];
$re = "select * from tweecoms as Tweecom limit $limit,$combien";
$r=$Acc->Select($re);
while($k=$r->fetch()) {
	$i++;
    $json_doc = array(
        "association_key" => $k['id'],
        "text" => $k['text'],
        "photo" => $k['photo'],
        "lien" => $k['lien'],
        "date" => $k['date'],
        "source" => $k['source'],
        "id_tweecom" => $k['id_tweecom'],
        "nb_retweets" => $k['nb_retweets'],
        "nb_favorite" => $k['nb_favorite'],
        "nb_followers" => $k['nb_followers'],
        "hashtag" => $k['hashtag'],
        "origine" => $k['origine'],
        "acceleration" => $k['acceleration'],
        "influence" => $k['influence'],
        "sentiment" => $k['sentiment'],
        "user_id" => $k['user_id'],
        "post_id" => $k['post_id'],
        $id = $k['id'],
    );
    $text = json_encode($json_doc);
    $baseUri = 'http://' . $search_host . ':' . $search_port . '/' . $index . '/' . $doc_type . '/' . $id;
    $ci = curl_init();
    curl_setopt($ci, CURLOPT_URL, $baseUri);
    curl_setopt($ci, CURLOPT_PORT, $search_port);
    curl_setopt($ci, CURLOPT_TIMEOUT, 200);
    curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ci, CURLOPT_FORBID_REUSE, 0);
    curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'PUT');
    curl_setopt($ci, CURLOPT_POSTFIELDS, $text);
    $response = curl_exec($ci);
    curl_close($ci);
}
echo "\n \r j'ai fini sa ".$_GET['l'];

```

Quant mon code est terminer j'ai eu sa dans le plegun head [look image](http://www.icoz.ma/a.png)

J'ai que 45 230 748 de data le reste je ne sais pas ou il est parti  
sa veux dire quoi docs: 45 230 748 ( **52 172 384** ) merci de m'aider a avoir la totalité de données dans elastic

Bien cordialement,

---

<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 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/recuperation-des-donnees-cacher/33453/2 "2017-07-06T13:50:47Z")

</div>


