Skip to content

PHP class to sync GitHub repository with Elasticsearch

License

Notifications You must be signed in to change notification settings

ecomclub/json-to-elastic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

json-to-elastic

Search for JSON files on GitHub repository and sync with ElasticSearch cluster.

Using

include './send-to-elastic.php'; // include class

/** array with options required */

$options = array(
    'githubUser' => 'Fulano', // Github Username
    'githubPass' => 'FulanoStrongPasswd', // Github Passwd
    'repository' => 'Fulano/Repository', // Repository Name
    'repoPath' => 'src', // Repository Path
    'elsType' => 'ElasticType', // Elasticsearch Type
    'elsIndex' => 'ElasticIndex', // Elasticsearch Index
    'elsHost' => 'localhost:9200' // Elasticsearch Host
);

// Create a new instance of class passing the array with options
$el = new SendToElastic($options);

// Call the function 
$el->getJson();

Releases

No releases published

Packages

No packages published

Languages