Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 096e1ee

Browse files
committed
Made default mapping deprecated.
1 parent 6ab5b05 commit 096e1ee

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ php artisan make:index-configurator MyIndexConfigurator
9191
```
9292

9393
It'll create the file `MyIndexConfigurator.php` in the `app` folder of your project.
94-
You can specify index name, settings and default mapping like in the following example:
94+
You can specify index name and settings like in the following example:
9595

9696
```php
9797
<?php
@@ -116,29 +116,10 @@ class MyIndexConfigurator extends IndexConfigurator
116116
]
117117
]
118118
];
119-
120-
// Common mapping for all types.
121-
protected $defaultMapping = [
122-
'_all' => [
123-
'enabled' => true
124-
],
125-
'dynamic_templates' => [
126-
[
127-
'es' => [
128-
'match' => '*_es',
129-
'match_mapping_type' => 'string',
130-
'mapping' => [
131-
'type' => 'string',
132-
'analyzer' => 'es_std'
133-
]
134-
]
135-
]
136-
]
137-
];
138119
}
139120
```
140121

141-
More about index settings and default mapping you can find in the [index management section](https://www.elastic.co/guide/en/elasticsearch/guide/current/index-management.html) of Elasticsearch documentation.
122+
More about index settings you can find in the [index management section](https://www.elastic.co/guide/en/elasticsearch/guide/current/index-management.html) of Elasticsearch documentation.
142123

143124
To create an index just run the artisan command:
144125

src/Console/stubs/index_configurator.stub

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,4 @@ class DummyClass extends IndexConfigurator
1212
protected $settings = [
1313
//
1414
];
15-
16-
protected $defaultMapping = [
17-
//
18-
];
1915
}

src/IndexConfigurator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public function getSettings()
2626
return $this->settings;
2727
}
2828

29+
/**
30+
* @deprecated
31+
*/
2932
public function getDefaultMapping()
3033
{
3134
return $this->defaultMapping;

0 commit comments

Comments
 (0)