Skip to content

Commit

Permalink
Adjust mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Richter committed Dec 11, 2024
1 parent ea8d019 commit 9b22676
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions Classes/Processing/BibElasticMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public static function getMappingParams(string $index): array
'mappings' => [
'dynamic' => false,
'properties' => [
'itemType' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'itemType' => [ 'type' => 'keyword' ],
'version' => [ 'type' => 'long' ],
'title' => [ 'type' => 'text'],
'university' => [ 'type' => 'text'],
'bookTitle' => [ 'type' => 'text'],
'series' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'publicationTitle' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'language' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'language' => [ 'type' => 'keyword' ],
'place' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'date' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
'archiveLocation' => [ 'type' => 'text', 'fields' => [ 'keyword' => [ 'type' => 'keyword', 'ignore_above' => 256 ] ] ],
Expand All @@ -31,12 +31,7 @@ public static function getMappingParams(string $index): array
'type' => 'nested',
'properties' => [
'creatorType' => [
'type' => 'text',
'fields' => [
'keyword' => [
'type' => 'keyword', 'ignore_above' => 256
]
]
'type' => 'keyword'
],
'firstName' => [
'type' => 'text',
Expand Down
6 changes: 3 additions & 3 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ plugin.tx_lisztcommon_searchlisting {
filters {
0 {
field = itemType
type = terms
type = keyword
}
1 {
field = creators
type = nested
script (
String firstName = doc['creators.firstName.keyword'].size() > 0 ? doc['creators.firstName.keyword'].value : '';
String lastName = doc['creators.lastName.keyword'].size() > 0 ? doc['creators.lastName.keyword'].value : '';
String type = doc['creators.creatorType.keyword'].size() > 0 ? doc['creators.creatorType.keyword'].value : '';
String type = doc['creators.creatorType'].size() > 0 ? doc['creators.creatorType'].value : '';
if (type == 'translator') {
return null;
}
Expand All @@ -62,7 +62,7 @@ plugin.tx_lisztcommon_searchlisting {
}
3 {
field = language
type = terms
type = keyword
}
4 {
field = publicationTitle
Expand Down

0 comments on commit 9b22676

Please sign in to comment.