Skip to content

Commit

Permalink
changed country search grscicoll to use fallback and align it with fa…
Browse files Browse the repository at this point in the history
…cets
  • Loading branch information
marcos-lg committed Oct 30, 2024
1 parent b881b1b commit 7d80199
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void listTest() {
.page(page)
.build(),
0);
assertSearch(CollectionListParams.builder().city(asList("Odense")).page(page).build(), 1);
assertSearch(CollectionListParams.builder().city(asList("Odense")).page(page).build(), 0);
assertSearch(
CollectionListParams.builder()
.city(asList("Copenhagen"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public void listTest() {
.page(page)
.build(),
0);
assertSearch(InstitutionListParams.builder().city(asList("Odense")).page(page).build(), 1);
assertSearch(InstitutionListParams.builder().city(asList("Odense")).page(page).build(), 0);
assertSearch(
InstitutionListParams.builder()
.city(asList("Copenhagen"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,29 +143,29 @@
<foreach item="item" collection="params.countries" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
OR mail_addr.country IN
OR (addr.country IS NULL AND mail_addr.country IN
<foreach item="item" collection="params.countries" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</foreach>)
)
</if>
<if test="params.regionCountries != null and params.regionCountries.size > 0">
AND (addr.country IN
<foreach item="item" collection="params.regionCountries" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
OR mail_addr.country IN
OR (addr.country IS NULL AND mail_addr.country IN
<foreach item="item" collection="params.regionCountries" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</foreach>)
)
</if>
<if test="params.city != null and params.city.size > 0" >
AND (
<trim suffixOverrides="OR">
<foreach item="item" collection="params.city">
normalize_name(addr.city) = normalize_name(#{item,jdbcType=VARCHAR}) OR
normalize_name(mail_addr.city) = normalize_name(#{item,jdbcType=VARCHAR}) OR
(addr.city IS NULL AND normalize_name(mail_addr.city) = normalize_name(#{item,jdbcType=VARCHAR})) OR
</foreach>
</trim>
)
Expand Down

0 comments on commit 7d80199

Please sign in to comment.