|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 120 ||All time: 9,425 This week: 171|
This class can insert many record values at once in ElasticSearch.
It can connect to one ElasticSearch server instance and takes an array of data values to insert in a given ElasticSearch index.
The class takes the array and splits it in chunks of configurable size, so it can insert the whole data array sending multiple requests to the ElasticSearch server.
The class can also connect to one or more possible server instances, so it can fallback to another server when the first one is not available for some reason.
|ElasticSearch is a well know search engine software that can associate data documents with keys that are used for performing fast searches.
Often applications need to store in ElasticSearch large amounts of data to be searched.
This package provides a solution to reduce the time to insert large data record sets in an ElasticSearch server instance.
elasticsearchbulkinsertion (Future Mode)
Elastic Search Bulk Insertion Library
This class will seed the data into elastic search
database using async requests and a PHP library
composer require mosta/bulkinsertion
1) Install elastic search library using composer:
composer require elasticsearch/elasticsearch
2) Set the host and port number if needed
3) Set the memory limit of the execution of the function
4) Put the index name which is equivalent to database name in SQL
5) Put the type which is equivalent to the table name in SQL
6) Put the chunk size which is going to be the number of records
elastic search will insert for each iteration
This will affect the performance of the machine you will be using
and elastic search machine.
7) Pass the data you want to insert into elastic search
$seeder = new ElasticSeeder;
'host' => '0.0.0.0',
'port' => '9200'
'dataKey1' => 'dataValue1',
'dataKey2' => 'dataValue2'
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.