Skip to content

Commit

Permalink
BGDIDIC-2829: add index for geologie hartsteinabbau
Browse files Browse the repository at this point in the history
  • Loading branch information
ltclm committed May 30, 2024
1 parent 6a7d7a6 commit 3c35574
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions conf/stopo.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,28 @@ source src_ch_swisstopo_geologie_reflexionsseismik : def_searchable_features
from geol.view_geologie_reflexionsseismik_sphinx
}

source src_ch_swisstopo_geologie_hartsteinabbau : def_searchable_features
{
sql_db = stopo_${DBSTAGING}
sql_query = \
WITH data as ( \
SELECT bgdi_id, obname, cpkind, the_geom from geol.hartstein_production UNION ALL \
SELECT bgdi_id, obname, cpkind, the_geom from geol.hartstein_mining \
) \
SELECT bgdi_id as id \
, obname as label \
, 'feature' as origin \
, remove_accents(concat_ws(' ', obname, cpkind)) as detail \
, 'ch.swisstopo.geologie-hartsteinabbau' as layer \
, quadindex(the_geom) as geom_quadindex \
, st_y(st_transform(st_centroid(the_geom),4326)) as lat \
, st_x(st_transform(st_centroid(the_geom),4326)) as lon \
, box2d(st_transform(the_geom, 21781)) as geom_st_box2d \
, box2d(st_transform(the_geom, 2056)) as geom_st_box2d_lv95 \
, bgdi_id as feature_id \
from data
}

## INDICES

index ch_swisstopo_verschiebungsvektoren_tsp1
Expand Down Expand Up @@ -1263,3 +1285,9 @@ index ch_swisstopo_geologie_reflexionsseismik : ch_swisstopo_verschiebungsvektor
source = src_ch_swisstopo_geologie_reflexionsseismik
path = /var/lib/sphinxsearch/data/index/ch_swisstopo_geologie_reflexionsseismik
}

index ch_swisstopo_geologie_hartsteinabbau : ch_swisstopo_verschiebungsvektoren_tsp1
{
source = src_ch_swisstopo_geologie_hartsteinabbau
path = /var/lib/sphinxsearch/data/index/ch_swisstopo_geologie_hartsteinabbau
}

0 comments on commit 3c35574

Please sign in to comment.