Skip to content

Commit da59b3f

Browse files
committed
TASK: Remove include_in_all handling and corresponding documentation
1 parent 57a70c9 commit da59b3f

4 files changed

Lines changed: 2 additions & 55 deletions

File tree

Classes/Driver/Version5/Mapping/NodeTypeMappingBuilder.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -110,38 +110,9 @@ public function buildMappingInformation(Index $index)
110110
*/
111111
protected function migrateConfigurationForElasticVersion5(array &$mapping)
112112
{
113-
$this->migrateIncludeInAllToCopyTo($mapping);
114113
$this->adjustStringTypeMapping($mapping);
115114
}
116115

117-
/**
118-
* include_in_all is deprecated with elasticsearch 5.x and raises
119-
* warnings on index creation
120-
*
121-
* @param array $mapping
122-
* @return void
123-
*/
124-
protected function migrateIncludeInAllToCopyTo(array &$mapping)
125-
{
126-
$migrateIncludeInAll = function (&$mapping) {
127-
if (isset($mapping['include_in_all'])) {
128-
if ((bool)$mapping['include_in_all'] === true) {
129-
$mapping['copy_to'] = '_all';
130-
}
131-
unset($mapping['include_in_all']);
132-
}
133-
};
134-
135-
$migrateIncludeInAll($mapping);
136-
137-
foreach ($mapping as &$item) {
138-
if (is_array($item)) {
139-
$migrateIncludeInAll($mapping);
140-
$this->migrateIncludeInAllToCopyTo($item);
141-
}
142-
}
143-
}
144-
145116
/**
146117
* Adjust the mapping for string to text or keyword as needed.
147118
*

Configuration/NodeTypes.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,34 @@
88
elasticSearchMapping:
99
type: string
1010
index: not_analyzed
11-
include_in_all: false
1211
indexing: '${node.identifier}'
1312

1413
'__workspace':
1514
search:
1615
elasticSearchMapping:
1716
type: string
1817
index: not_analyzed
19-
include_in_all: false
2018
indexing: '${node.context.workspace.name}'
2119

2220
'__path':
2321
search:
2422
elasticSearchMapping:
2523
type: string
2624
index: not_analyzed
27-
include_in_all: false
2825
indexing: '${node.path}'
2926

3027
'__parentPath':
3128
search:
3229
elasticSearchMapping:
3330
type: string
3431
index: not_analyzed
35-
include_in_all: false
3632
# we index *all* parent paths as separate tokens to allow for efficient searching without a prefix query
3733
indexing: '${Indexing.buildAllPathPrefixes(node.parentPath)}'
3834

3935
'__sortIndex':
4036
search:
4137
elasticSearchMapping:
4238
type: integer
43-
include_in_all: false
4439
indexing: '${node.index}'
4540

4641
'_removed':
@@ -54,30 +49,26 @@
5449
elasticSearchMapping:
5550
type: string
5651
index: not_analyzed
57-
include_in_all: false
5852
indexing: '${Indexing.extractNodeTypeNamesAndSupertypes(node.nodeType)}'
5953

6054
'_lastModificationDateTime':
6155
search:
6256
elasticSearchMapping:
6357
type: date
64-
include_in_all: false
6558
format: 'date_time_no_millis'
6659
indexing: '${(node.lastModificationDateTime ? Date.format(node.lastModificationDateTime, "Y-m-d\TH:i:sP") : null)}'
6760

6861
'_lastPublicationDateTime':
6962
search:
7063
elasticSearchMapping:
7164
type: date
72-
include_in_all: false
7365
format: 'date_time_no_millis'
7466
indexing: '${(node.lastPublicationDateTime ? Date.format(node.lastPublicationDateTime, "Y-m-d\TH:i:sP") : null)}'
7567

7668
'_creationDateTime':
7769
search:
7870
elasticSearchMapping:
7971
type: date
80-
include_in_all: false
8172
format: 'date_time_no_millis'
8273
indexing: '${(node.creationDateTime ? Date.format(node.creationDateTime, "Y-m-d\TH:i:sP") : null)}'
8374

@@ -95,15 +86,13 @@
9586
search:
9687
elasticSearchMapping:
9788
type: date
98-
include_in_all: false
9989
format: 'date_time_no_millis'
10090
indexing: '${(node.hiddenBeforeDateTime ? Date.format(node.hiddenBeforeDateTime, "Y-m-d\TH:i:sP") : null)}'
10191

10292
'_hiddenAfterDateTime':
10393
search:
10494
elasticSearchMapping:
10595
type: date
106-
include_in_all: false
10796
format: 'date_time_no_millis'
10897
indexing: '${(node.hiddenAfterDateTime ? Date.format(node.hiddenAfterDateTime, "Y-m-d\TH:i:sP") : null)}'
10998

@@ -125,7 +114,6 @@
125114
search:
126115
elasticSearchMapping:
127116
type: object
128-
include_in_all: false
129117
enabled: false
130118
indexing: ''
131119
'__fulltext':

Configuration/Settings.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ Neos:
8686
string:
8787
elasticSearchMapping:
8888
type: string
89-
include_in_all: false
9089

9190
boolean:
9291
elasticSearchMapping:
@@ -100,7 +99,6 @@ Neos:
10099
elasticSearchMapping:
101100
type: date
102101
format: 'date_time_no_millis'
103-
include_in_all: false
104102

105103
'Neos\Media\Domain\Model\Asset':
106104
elasticSearchMapping: '' # deliberately don't map or index this

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ for all your filterable properties, or else filtering won't work on them properl
305305
search:
306306
elasticSearchMapping:
307307
type: "string"
308-
include_in_all: false
309308
index: 'not_analyzed'
310309
```
311310
@@ -421,11 +420,7 @@ Furthermore, we want that a fulltext match e.g. inside a headline is seen as *mo
421420
a match inside the normal body text. That's why the `Document` node not only contains one field with
422421
all the texts, but multiple "buckets" where text is added to: One field which contains everything
423422
deemed as "very important" (`__fulltext.h1`), one which is "less important" (`__fulltext.h2`),
424-
and finally one for the plain text (`__fulltext.text`). All of these fields add themselves to the
425-
Elasticsearch `_all` field, and are configured with different `boost` values.
426-
427-
In order to search this index, you can just search inside the `_all` field with an additional limitation
428-
of `__typeAndSupertypes` containing `Neos.Neos:Document`.
423+
and finally one for the plain text (`__fulltext.text`). All of these fields are configured with different `boost` values.
429424
430425
**For a search user interface, checkout the Flowpack.SearchPlugin package**
431426
@@ -505,12 +500,10 @@ Neos:
505500
Search:
506501
defaultConfigurationPerType:
507502

508-
# strings should, by default, not be included in the _all field; and
509-
# indexing should just use their simple value.
503+
# strings should just be indexed with their simple value.
510504
string:
511505
elasticSearchMapping:
512506
type: string
513-
include_in_all: false
514507
indexing: '${value}'
515508
```
516509
@@ -525,7 +518,6 @@ Neos:
525518
# Elasticsearch understands
526519
elasticSearchMapping:
527520
type: DateTime
528-
include_in_all: false
529521
format: 'date_time_no_millis'
530522
indexing: '${(node.hiddenBeforeDateTime ? Date.format(node.hiddenBeforeDateTime, "Y-m-d\TH:i:sP") : null)}'
531523
```
@@ -628,13 +620,11 @@ Neos:
628620
'Neos\Media\Domain\Model\Asset':
629621
elasticSearchMapping:
630622
type: attachment
631-
include_in_all: true
632623
indexing: ${Indexing.indexAsset(value)}
633624

634625
'array<Neos\Media\Domain\Model\Asset>':
635626
elasticSearchMapping:
636627
type: attachment
637-
include_in_all: true
638628
indexing: ${Indexing.indexAsset(value)}
639629
```
640630

0 commit comments

Comments
 (0)