5 * Configure the elasticsearch index.
6 * Throws away all data.
8 require_once __DIR__ . '/../src/init.php';
10 $json = file_get_contents(__DIR__ . '/../data/elasticsearch-mapping.json');
11 if (json_decode($json) === null) {
12 echo "Error: Schema JSON is broken\n";
13 chdir(__DIR__ . '/../');
14 passthru('json_pp -t null < data/elasticsearch-mapping.json');
19 $r = new Elasticsearch_Request(
20 $GLOBALS['phinde']['elasticsearch'],
21 \HTTP_Request2::METHOD_DELETE
27 $r = new Elasticsearch_Request(
28 $GLOBALS['phinde']['elasticsearch'],
29 \HTTP_Request2::METHOD_PUT