Skip to content

Commit

Permalink
Merge pull request #327 from daniellienert/task/refactor-nodetypes
Browse files Browse the repository at this point in the history
TASK: Refactor nodeTypes to separate files
  • Loading branch information
daniellienert committed May 4, 2020
2 parents 2716383 + ff81762 commit 9038c0d
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 84 deletions.
48 changes: 48 additions & 0 deletions Configuration/NodeTypes.Override.Document.yaml
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}'
5 changes: 5 additions & 0 deletions Configuration/NodeTypes.Override.Hidable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'Neos.Neos:Hidable':
properties:
'_hidden':
search:
indexing: '${node.hidden}'
Original file line number Diff line number Diff line change
Expand Up @@ -68,87 +68,3 @@
indexing: '${(node.creationDateTime ? Date.format(node.creationDateTime, "Y-m-d\TH:i:sP") : null)}'

'unstructured': *node

'Neos.Neos:Hidable':
properties:
'_hidden':
search:
indexing: '${node.hidden}'

'Neos.Neos:Timable':
properties:
'_hiddenBeforeDateTime':
search:
elasticSearchMapping:
type: date
format: 'date_time_no_millis'
indexing: '${(node.hiddenBeforeDateTime ? Date.format(node.hiddenBeforeDateTime, "Y-m-d\TH:i:sP") : null)}'

'_hiddenAfterDateTime':
search:
elasticSearchMapping:
type: date
format: 'date_time_no_millis'
indexing: '${(node.hiddenAfterDateTime ? Date.format(node.hiddenAfterDateTime, "Y-m-d\TH:i:sP") : null)}'


'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}'

'Neos.NodeTypes.BaseMixins:TextMixin':
properties:
'text':
search:
fulltextExtractor: '${Indexing.extractHtmlTags(value)}'

'Neos.NodeTypes.BaseMixins:TitleMixin':
properties:
'title':
search:
fulltextExtractor: '${Indexing.extractHtmlTags(value)}'
5 changes: 5 additions & 0 deletions Configuration/NodeTypes.Override.TextMixin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'Neos.NodeTypes.BaseMixins:TextMixin':
properties:
'text':
search:
fulltextExtractor: '${Indexing.extractHtmlTags(value)}'
15 changes: 15 additions & 0 deletions Configuration/NodeTypes.Override.Timable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'Neos.Neos:Timable':
properties:
'_hiddenBeforeDateTime':
search:
elasticSearchMapping:
type: date
format: 'date_time_no_millis'
indexing: '${(node.hiddenBeforeDateTime ? Date.format(node.hiddenBeforeDateTime, "Y-m-d\TH:i:sP") : null)}'

'_hiddenAfterDateTime':
search:
elasticSearchMapping:
type: date
format: 'date_time_no_millis'
indexing: '${(node.hiddenAfterDateTime ? Date.format(node.hiddenAfterDateTime, "Y-m-d\TH:i:sP") : null)}'
5 changes: 5 additions & 0 deletions Configuration/NodeTypes.Override.TitleMixin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'Neos.NodeTypes.BaseMixins:TitleMixin':
properties:
'title':
search:
fulltextExtractor: '${Indexing.extractHtmlTags(value)}'

0 comments on commit 9038c0d

Please sign in to comment.