Skip to content

Commit

Permalink
BGDIDIC-2867: add search sphinx index
Browse files Browse the repository at this point in the history
  • Loading branch information
faselm committed Oct 18, 2024
1 parent 0b63267 commit 32a3e84
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions conf/stopo.conf.part
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,24 @@ source src_ch_swisstopo_geologie_tektonische_karte_unit : def_searchable_feature
from geol.tektonische_karte_units
}

source src_ch_swisstopo_geologie_thermale_waesser : def_searchable_features
{
sql_db = stopo_${DBSTAGING}
sql_query = \
SELECT primary_key as id \
, name as label \
, 'feature' as origin \
, remove_accents(concat_ws(' ', name, source1)) as detail \
, 'ch.swisstopo.geologie-thermale_waesser' 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 \
, primary_key::text as feature_id \
from geol.thermale_waters
}

## INDICES

index ch_swisstopo_verschiebungsvektoren_tsp1
Expand Down Expand Up @@ -1346,3 +1364,9 @@ index ch_swisstopo_geologie_tektonische_karte
local = ch_swisstopo_geologie_tektonische_karte_line
local = ch_swisstopo_geologie_tektonische_karte_unit
}

index ch_swisstopo_geologie_thermale_waesser : ch_swisstopo_verschiebungsvektoren_tsp1
{
source = src_ch_swisstopo_geologie_thermale_waesser
path = /var/lib/sphinxsearch/data/index/ch_swisstopo_geologie_thermale_waesser
}

0 comments on commit 32a3e84

Please sign in to comment.