diff --git a/config/elasticsearch.php b/config/elasticsearch.php index 3cd844d..2d1951d 100755 --- a/config/elasticsearch.php +++ b/config/elasticsearch.php @@ -26,37 +26,79 @@ */ 'connections' => [ 'default' => [ - 'servers' => [ - [ - 'host' => env('ELASTIC_HOST', '127.0.0.1'), - 'port' => env('ELASTIC_PORT', 9200), - 'user' => env('ELASTIC_USER', ''), - 'pass' => env('ELASTIC_PASS', ''), - 'scheme' => env('ELASTIC_SCHEME', 'http'), - ], - ], - - 'index' => env('ELASTIC_INDEX', 'my_index'), - - // Elasticsearch handlers - // 'handler' => new MyCustomHandler(), - - // Uncomment to disable reporting queries to Sentry as breadcrumbs - // 'report_queries' => false + 'hosts' => env('ELASTICSEARCH_HOST', 'http://localhost:9200'), + 'index' => env('ELASTICSEARCH_INDEX', 'my_index'), ], - ], - /* - |-------------------------------------------------------------------------- - | Elasticsearch Logger - |-------------------------------------------------------------------------- - | - | This setting defines which logging channel will be used by the - | Elasticsearch library to write log messages. You are free to specify any - | of your logging channels listed inside the "logging" configuration file. - | - */ - 'logger' => env('ELASTIC_LOGGER'), + //'authenticated' => [ + // 'hosts' => env('ELASTICSEARCH_HOST', 'https://localhost:9200'), + // 'index' => env('ELASTICSEARCH_INDEX', 'my_index'), + // 'sslVerification' => false, + // 'basicAuthentication' => [ + // 'username' => env('ELASTICSEARCH_USERNAME', 'elastic'), + // 'password' => env('ELASTICSEARCH_PASSWORD'), + // ], + //], + // + //'authenticated_with_apikey' => [ + // 'hosts' => env('ELASTICSEARCH_HOST', 'https://localhost:9200'), + // 'index' => env('ELASTICSEARCH_INDEX', 'my_index'), + // 'apiKey' => [ + // 'id' => env('ELASTICSEARCH_API_KEY_ID'), + // 'apiKey' => env('ELASTICSEARCH_API_KEY'), + // ], + //], + // + //'multiple_hosts' => [ + // 'hosts' => env( + // 'ELASTICSEARCH_HOST', + // 'https://first.host.tld:9200,https://second.host.tld:9200,https://third.host.tld:9200' + // ), + //], + // + //'various_settings' => [ + // + // // Set Elastic Cloud ID to connect to Elastic Cloud + // 'elasticCloudId' => env('ELASTICSEARCH_CLOUD_ID'), + // + // // Set number or retries (default is equal to number of nodes) + // 'retries' => 3, + // + // // Set the selector algorithm + // 'selector' => true, + // + // // Whether to sniff the connection on startup + // 'sniffOnStart' => false, + // + // 'sslCert' => [ + // + // // The name of a file containing a PEM-formatted public TLS certificate + // 'cert' => env('ELASTICSEARCH_TLS_CERT_PATH'), + // + // // Optional passphrase for the certificate + // 'password' => env('ELASTICSEARCH_TLS_CERT_PASSPHRASE'), + // ], + // + // 'sslKey' => [ + // + // // The name of a file containing a private TLS key + // 'key' => env('ELASTICSEARCH_TLS_KEY_PATH'), + // + // // Optional passphrase used to decrypt the private TLS key + // 'password' => env('ELASTICSEARCH_TLS_KEY_PASSPHRASE'), + // ], + // + // // Enable or disable verification of the SSL certificate + // 'sslVerification' => false, + // + // // Set or disable the x-elastic-client-meta header + // 'elasticMetaHeader' => true, + // + // // Include the port in Host header. + // // See: https://github.com/elastic/elasticsearch-php/issues/993 + // 'includePortInHostHeader' => true, + //], + ], /* |-------------------------------------------------------------------------- @@ -79,36 +121,36 @@ 'settings' => [ 'number_of_shards' => 1, 'number_of_replicas' => 0, - "index.mapping.ignore_malformed" => false, + 'index.mapping.ignore_malformed' => false, - "analysis" => [ - "filter" => [ - "english_stop" => [ - "type" => "stop", - "stopwords" => "_english_", + 'analysis' => [ + 'filter' => [ + 'english_stop' => [ + 'type' => 'stop', + 'stopwords' => '_english_', ], - "english_keywords" => [ - "type" => "keyword_marker", - "keywords" => ["example"], + 'english_keywords' => [ + 'type' => 'keyword_marker', + 'keywords' => ['example'], ], - "english_stemmer" => [ - "type" => "stemmer", - "language" => "english", + 'english_stemmer' => [ + 'type' => 'stemmer', + 'language' => 'english', ], - "english_possessive_stemmer" => [ - "type" => "stemmer", - "language" => "possessive_english", + 'english_possessive_stemmer' => [ + 'type' => 'stemmer', + 'language' => 'possessive_english', ], ], - "analyzer" => [ - "rebuilt_english" => [ - "tokenizer" => "standard", - "filter" => [ - "english_possessive_stemmer", - "lowercase", - "english_stop", - "english_keywords", - "english_stemmer", + 'analyzer' => [ + 'rebuilt_english' => [ + 'tokenizer' => 'standard', + 'filter' => [ + 'english_possessive_stemmer', + 'lowercase', + 'english_stop', + 'english_keywords', + 'english_stemmer', ], ], ],