1. Go to this page and download the library: Download neelkanthk/esloader library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* index : Name of the Elasticsearch index
* doc_id_key : The field in your dataset which you want to keep as Es document id. NULL assigns a Es auto generated id
* connection : Set it `local` if you have a self managed Es cluster. For AWS hosted Es set it to `aws`
* local : Es configuration for your self managed Es
* aws : Es configuration for your AWS managed Es
* mappings : Define Es mappings as per your dataset
* settings : Define Es settings as per your true
],
"properties" => [
"id" => ['type' => 'keyword'],
"first_name" => ['type' => 'text'],
"last_name" => ['type' => 'text'],
"email" => ['type' => 'keyword'],
"gender" => ['type' => 'keyword'],
"points" => ['type' => 'integer']
]
],
],
"settings" => [
'number_of_shards' => 2,
'number_of_replicas' => 0
],
"batch_size" => 100
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.