PHP code example of triadev / laravel-elasticsearch-config-builder
1. Go to this page and download the library: Download triadev/laravel-elasticsearch-config-builder 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/ */
triadev / laravel-elasticsearch-config-builder example snippets
return [
'refresh_interval' => "30s",
'analysis' => [
'filter' => [
'germanStop' => [
'type' => 'stop',
'stopwords' => '_german_'
]
],
'analyzer' => [
'exampleAnalyzer' => [
'type' => 'custom',
'tokenizer' => 'standard',
'filter' => [
'germanStop'
]
]
]
]
];
return [
'type' => 'field',
'locales' => [
'enUS'
],
'fields' => [
'example.properties.title'
],
'configPerLocale' => [
'example.properties.title' => [
'enUS' => [
'analyzer' => 'exampleAnalyzerEn'
]
]
]
];