PHP code example of hellopablo / esconfig

1. Go to this page and download the library: Download hellopablo/esconfig 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/ */

    

hellopablo / esconfig example snippets

json
{
    "host": "localhost:9200",
    "warm": "php ./warm_es.php",
    "host": {
        "DEVELOPMENT": "192.168.99.100:32769",
        "PRODUCTION": "localhost:9200",
        "STAGING": "localhost:9200"
    },
    "warm": {
        "DEVELOPMENT": "php ./warm_es.php {{__HOST__}}",
        "PRODUCTION": "php ./warm_es.php {{__HOST__}}",
        "STAGING": "php ./warm_es.php {{__HOST__}}"
    }
    "default_environment": "DEVELOPMENT",
    "indexes": [
        {
            "name": "my-index",
            "settings": {},
            "mappings": {
                "my-item": {
                    "properties": {
                        "location": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        },
        {
            "name": "another-index",
            "settings": {},
            "mappings": {
                "another-item": {
                    "properties": {
                        "location": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        }
    ]
}