-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Refactor nodeTypes to separate files
- Loading branch information
1 parent
2f80e3c
commit 8b6a878
Showing
3 changed files
with
118 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
'Neos.Neos:Document': | ||
search: | ||
fulltext: | ||
isRoot: true | ||
properties: | ||
'uriPathSegment': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
title: | ||
search: | ||
fulltextExtractor: ${Indexing.extractInto('h1', value)} | ||
'__fulltextParts': | ||
search: | ||
elasticSearchMapping: | ||
type: object | ||
enabled: false | ||
indexing: '' | ||
'__fulltext': | ||
search: | ||
indexing: '' | ||
elasticSearchMapping: | ||
type: object | ||
properties: | ||
'h1': | ||
type: text | ||
boost: 20 | ||
'h2': | ||
type: text | ||
boost: 12 | ||
'h3': | ||
type: text | ||
boost: 10 | ||
'h4': | ||
type: text | ||
boost: 5 | ||
'h5': | ||
type: text | ||
boost: 3 | ||
'h6': | ||
type: text | ||
boost: 2 | ||
'text': | ||
type: text | ||
boost: 1 | ||
'_hiddenInIndex': | ||
search: | ||
indexing: '${node.hiddenInIndex}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
'Neos.Neos:Node': &node | ||
search: | ||
fulltext: | ||
enable: true | ||
properties: | ||
'__identifier': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
indexing: '${node.identifier}' | ||
|
||
'__workspace': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
indexing: '${node.context.workspace.name}' | ||
|
||
'__path': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
indexing: '${node.path}' | ||
|
||
'__parentPath': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
# we index *all* parent paths as separate tokens to allow for efficient searching without a prefix query | ||
indexing: '${Indexing.buildAllPathPrefixes(node.parentPath)}' | ||
|
||
'__sortIndex': | ||
search: | ||
elasticSearchMapping: | ||
type: integer | ||
indexing: '${node.index}' | ||
|
||
'_removed': | ||
search: | ||
elasticSearchMapping: '' # deliberately don't map or index this | ||
indexing: '' | ||
|
||
# we index the node type INCLUDING ALL SUPERTYPES | ||
'__typeAndSupertypes': | ||
search: | ||
elasticSearchMapping: | ||
type: keyword | ||
indexing: '${Indexing.extractNodeTypeNamesAndSupertypes(node.nodeType)}' | ||
|
||
'_lastModificationDateTime': | ||
search: | ||
elasticSearchMapping: | ||
type: date | ||
format: 'date_time_no_millis' | ||
indexing: '${(node.lastModificationDateTime ? Date.format(node.lastModificationDateTime, "Y-m-d\TH:i:sP") : null)}' | ||
|
||
'_lastPublicationDateTime': | ||
search: | ||
elasticSearchMapping: | ||
type: date | ||
format: 'date_time_no_millis' | ||
indexing: '${(node.lastPublicationDateTime ? Date.format(node.lastPublicationDateTime, "Y-m-d\TH:i:sP") : null)}' | ||
|
||
'_creationDateTime': | ||
search: | ||
elasticSearchMapping: | ||
type: date | ||
format: 'date_time_no_millis' | ||
indexing: '${(node.creationDateTime ? Date.format(node.creationDateTime, "Y-m-d\TH:i:sP") : null)}' | ||
|
||
'unstructured': *node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters