Skip to content

Commit

Permalink
Reorder facets and remove translators from creator facet
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Richter committed Dec 10, 2024
1 parent 28aaf7f commit 40ae182
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,33 @@ plugin.tx_lisztcommon_searchlisting {
type = terms
}
1 {
field = place
type = terms
}
2 {
field = date
type = terms
}
3 {
field = publicationTitle
type = terms
}
4 {
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 : '';
if (type == 'translator') {
return null;
}
if (firstName == '' && lastName == '') {
return null;
}
return (firstName + ' ' + lastName).trim();
)
}
2 {
field = date
type = terms
}
3 {
field = language
type = terms
}
4 {
field = publicationTitle
type = terms
}
}
}
}
Expand Down

0 comments on commit 40ae182

Please sign in to comment.