Skip to content

Commit

Permalink
Merge pull request #26 from geoadmin/dev_avoid_empty_string
Browse files Browse the repository at this point in the history
Making sure a the label is generated even if a field is empty
  • Loading branch information
loicgasser committed Oct 23, 2013
2 parents f3d075b + a86607a commit b420580
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conf/sphinx.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ source src_address : src_swisssearch
SELECT \
gid as id \
, search_name as detail \
, strname1||' '||deinr||' <b>'||plz||' '||ort_27||'</b>' as label \
, coalesce(strname1,'')||' '||coalesce(deinr,'')||' <b>'||coalesce(plz,'')||' '||coalesce(ort_27,'')||'</b>' as label \
, origin as origin \
, st_box2d(the_geom) as geom_st_box2d \
, 6 as rank \
Expand All @@ -42,7 +42,7 @@ source src_parcel : src_swisssearch
SELECT \
gid as id \
, search_name as detail \
, gemname||' '||name as label \
, coalesce(gemname,'')||' '||coalesce(name,'') as label \
, origin as origin \
, st_box2d(the_geom) as geom_st_box2d \
, 7 as rank \
Expand All @@ -58,7 +58,7 @@ source src_sn25 : src_swisssearch
SELECT \
gid as id \
, search_name as detail \
, '<b>'||name||'</b> ('||kanton||') - '||gemname as label \
, '<b>'||coalesce(name,'')||'</b> ('||coalesce(kanton,'')||') - '||coalesce(gemname,'') as label \
, origin as origin \
, st_box2d(the_geom) as geom_st_box2d \
, rank as rank \
Expand All @@ -74,7 +74,7 @@ source src_gg25 : src_swisssearch
SELECT \
gid as id \
, search_name as detail \
, '<b>'||gemname||' ('||kanton||')</b>' as label \
, '<b>'||coalesce(gemname,'')||' ('||coalesce(kanton,'')||')</b>' as label \
, origin as origin \
, st_box2d(the_geom) as geom_st_box2d \
, rank as rank \
Expand Down Expand Up @@ -122,7 +122,7 @@ source src_zipcode : src_swisssearch
SELECT \
gid as id \
, search_name as detail \
, '<b>'||plz||' - '||ort_27||' ('||kanton||')</b>' as label \
, '<b>'||coalesce(plz,'')||' - '||coalesce(ort_27,'')||' ('||coalesce(kanton,'')||')</b>' as label \
, origin as origin \
, st_box2d(the_geom) as geom_st_box2d \
, rank as rank \
Expand Down

0 comments on commit b420580

Please sign in to comment.