https://github.com/ecomclub/json-to-elastic
PHP class to sync GitHub repository with Elasticsearch
https://github.com/ecomclub/json-to-elastic
elasticsearch elasticsearch-sync github-api php-class php7
Last synced: 3 months ago
JSON representation
PHP class to sync GitHub repository with Elasticsearch
- Host: GitHub
- URL: https://github.com/ecomclub/json-to-elastic
- Owner: ecomclub
- License: mit
- Created: 2018-08-29T16:36:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-03T17:23:10.000Z (almost 8 years ago)
- Last Synced: 2025-03-16T22:23:05.008Z (over 1 year ago)
- Topics: elasticsearch, elasticsearch-sync, github-api, php-class, php7
- Language: PHP
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-to-elastic
Search for JSON files on GitHub repository and sync with ElasticSearch cluster.
## Using
```php
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();
```