Skip to content

Commit

Permalink
fix: empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreiffers committed Oct 11, 2024
1 parent 48fca5f commit 92020e6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class ConceptSearchService(

private var anbefaltTermSortScript: String =
"""
if (doc['anbefaltTerm.navn.nb.keyword'].size() != 0) {
if (!doc['anbefaltTerm.navn.nb.keyword'].empty) {
return doc['anbefaltTerm.navn.nb.keyword'].value.toLowerCase();
} else if (doc['anbefaltTerm.navn.nn.keyword'].size() != 0) {
} else if (!doc['anbefaltTerm.navn.nn.keyword'].empty) {
return doc['anbefaltTerm.navn.nn.keyword'].value.toLowerCase();
} else if (doc['anbefaltTerm.navn.en.keyword'].size() != 0) {
} else if (!doc['anbefaltTerm.navn.en.keyword'].empty) {
return doc['anbefaltTerm.navn.en.keyword'].value.toLowerCase();
} else {
} else {
return '';
}
"""
Expand Down

0 comments on commit 92020e6

Please sign in to comment.