Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Elasticsearch Services
Search Doc Service
Commits
597af8e4
Commit
597af8e4
authored
Feb 18, 2021
by
Jonas Waeber
Browse files
Add institution teaser color
parent
e19f1cea
Pipeline
#21983
failed with stages
in 4 minutes and 34 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
597af8e4
...
...
@@ -34,7 +34,7 @@ ext {
dependencies
{
compile
group:
'org.elasticsearch.client'
,
name:
'elasticsearch-rest-high-level-client'
,
version:
'7.6.1'
implementation
'org.memobase:memobase-service-utilities:2.0.1
3
'
implementation
'org.memobase:memobase-service-utilities:2.0.1
4
'
implementation
'org.apache.jena:apache-jena:3.14.0'
// Logging Framework
...
...
src/main/kotlin/InstitutionSearchDocBuilder.kt
View file @
597af8e4
...
...
@@ -18,6 +18,7 @@
package
org.memobase
import
ch.memobase.rdf.MB
import
ch.memobase.rdf.NS
import
com.beust.klaxon.JsonArray
import
com.beust.klaxon.JsonObject
...
...
@@ -113,16 +114,16 @@ class InstitutionSearchDocBuilder(
numberOfDocuments
=
recordSetIds
.
map
{
value
->
elasticSearchWrapper
.
countNumberOfDocuments
(
value
)
}
.
sum
(),
teaserColor
=
institution
[
KEYS
.
teaserColor
].
let
{
teaserColor
=
institution
[
MB
.
institutionTeaserColor
.
localName
].
let
{
if
(
it
==
null
)
{
log
.
error
(
"No teaser colour found for institution $id."
)
log
.
warn
(
"No teaser colour found for institution $id."
)
""
}
else
it
as
String
},
teaserColorComputed
=
institution
[
KEYS
.
teaserColorComputed
].
let
{
teaserColorComputed
=
institution
[
MB
.
institutionComputedTeaserColor
.
localName
].
let
{
if
(
it
==
null
)
{
log
.
error
(
"No computed teaser colour found for institution $id."
)
log
.
warn
(
"No computed teaser colour found for institution $id."
)
""
}
else
it
as
String
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment