geoadmin / mf-chsdi3

api3.geo.admin.ch source code
https://api3.geo.admin.ch
Other
33 stars 15 forks source link

new origin gazetteer in swisssearch #1495

Closed ltclm closed 8 years ago

ltclm commented 9 years ago

We will soon integrate the new swissnames3d data and add this data to the swisssearch index.

@davidoesch proposed to create a new neutral origin gazetteer (same priority as sn25) which is not related to swisstopo products. The swissnames3d data and soon bav haltestellen data will be added via this index origin to swisssearch. This origin should replace sn25.

@gjn could you please analyze in kibana if the service url parameter origins=sn25 is used frequently.

gjn commented 9 years ago

241 in last 30 days.

10 in last 24 hours.

ltclm commented 9 years ago

thanks! @davidoesch what do you want to do with the deprecated origin sn25

davidoesch commented 9 years ago

@cedricmoullet

we have to following option for using origin parameter which is official in api3

A) use sn25 as well for the content swissnames3d and other place names which will come (eg public stops, ): nothing will change for customer, but the variable sn25 is not correct

B) depreciate sn25 origin since it will be replaced by gazetteer which will contain swissnames3d and all the other stuff : we will break in average 200 queries/month. We announce this in the api3 forum that we will depriciate thsi one month in advacne

-> I tend for B)

your thoughts?

cedricmoullet commented 9 years ago

B

2015-06-09 10:14 GMT+02:00 davidoesch notifications@github.com:

@cedricmoullet https://github.com/cedricmoullet

we have to following option for using origin parameter which is official in api3

A) use sn25 as well for the content swissnames3d and other place names which will come (eg public stops, ): nothing will change for customer, but the variable sn25 is not correct

B) depreciate sn25 origin since it will be replaced by gazetteer which will contain swissnames3d and all the other stuff : we will break in average 200 queries/month. We announce this in the api3 forum that we will depriciate thsi one month in advacne

-> I tend for B)

your thoughts?

— Reply to this email directly or view it on GitHub https://github.com/geoadmin/mf-chsdi3/issues/1495#issuecomment-110271487 .

Twitter: http://twitter.com/cedricmoullet Linked In: http://www.linkedin.com/in/cedricmoullet

http://twitter.com/cedricmoullet

davidoesch commented 9 years ago

ok we go for B)

@gjn can you announce the switch to origin:gazetteer for sn25 in the news forum as you did for "decomissioning of the featureidentify service " thanks ( i let you find the correct wording)

gjn commented 9 years ago

Soory, I'm late to this.

B) In addition to origins=sn25 queries, we have to consider clients doing the filtering on their side. So they might issue a standard location search and then use sn25 string in the treatement of the results. We can't know how many clients are doing this. In fact, we are doing this for map.geo.admin. This code is https://github.com/geoadmin/mf-geoadmin3/blob/28e3147fce025950a9e14434b86211592d3d276a/src/components/search/SearchTypesDirectives.js#L15 and would need to be adapted before we go live. @davidoesch I guess this fact doesn't change the decision to deprecate sn25.

When is the release of the new index planned? We need first a) inform our list and b) make at least one map.geo deploy with corrected code to handle new gazetter index correctly

ltclm commented 9 years ago

The referenced Sphinx PR https://github.com/geoadmin/service-sphinxsearch/issues/228 is adding a new origin gazetteer to the swisssearch index.

This new origin contains swissnames3d data (points, lines and polygons). points from this origin should be recentered to zoomlevel 10 [1] lines and polygons should be recentered to fit their shape

We should add this new index as soon as possible to swisssearch. @mariokeusen do you have other infos?

[1] https://github.com/geoadmin/mf-geoadmin3/blob/28e3147fce025950a9e14434b86211592d3d276a/src/components/search/SearchTypesDirectives.js#L15

gjn commented 9 years ago

How do I know if a gazetter result is a point, a line or a polygon?

ltclm commented 9 years ago

yes, that's a problem. We could add the geometry type to swisssearch index and to the response of SearchServer?searchText=natterloch&lang=de&type=locations

But then we have to define how this information will be treated by the code. I would say that the originToZoomLevel should only be used for point geometries, so: geometrytype > originToZoomLevel Lines and Polygons should always be recentered to their bbox Extent, but if their extent is too small, we should zoom to originToZoomLevel instead. Have no idea if this is doable.

gjn commented 9 years ago

Does geom_st_box2d contain the bounding box? If yes, we can maybe use this to determine if we have a point, line or polygon.

Question: didn't sn25 also contain different kind of geometries?

ltclm commented 9 years ago

yes, thats a good idea! this attribute has the feature geometry bbox:

points: geom_st_box2d: "BOX(634786 239649,634786 239649)"
line/polygon: geom_st_box2d: "BOX(548583.525711268 110337.666519084,722965.878504778 221514.364319869)"

sn25 has only points, gg25, zipcode, district and kantone have polygon geometries.

gjn commented 9 years ago

As discussed with @ltclm, adapt the linked PR to create new swisssearch_preview and swisssearch_fuzzy_preview indices where sn25 is replaced by new gazetter index. We will deploy this preview index on next deploy date and then announce it on our list. Then clients (including us) can adapt their code with the help of the new preview index (during 2 weeks).

After 2 weeks, we'll change sn25 to gazetter in the official swisssearch index (while keepin the preview index for another 2-4 weeks).

2-step process assures clients never have any downtime (it's approach we chose for api update as well).

davidoesch commented 9 years ago

+1 thanks Gilbert

On Fri, Jul 3, 2015 at 7:53 AM, Gilbert Jeiziner notifications@github.com wrote:

As discussed with @ltclm, adapt the linked PR to create new swisssearch_preview and swisssearch_fuzzy_preview indices where sn25 is replaced by new gazetter index. We will deploy this preview index on next deploy date and then announce it on our list. Then clients (including us) can adapt their code with the help of the new preview index (during 2 weeks). After 2 weeks, we'll change sn25 to gazetter in the official swisssearch index (while keepin the preview index for another 2-4 weeks).

2-step process assures clients never have any downtime (it's approach we chose for api update as well).

Reply to this email directly or view it on GitHub: https://github.com/geoadmin/mf-chsdi3/issues/1495#issuecomment-118245416

ltclm commented 9 years ago

The temporary distributed indices have been created on sphinx dev. Their names are swisssearch_preview swisssearch_preview_fuzzy

In these indexes, sn25 has been replaced by gazetteer.

gjn commented 9 years ago

ok, I'll test with our backends and will adapt to use those new indices on next deploy.

loicgasser commented 8 years ago

https://github.com/geoadmin/mf-chsdi3/pull/2013

gjn commented 8 years ago

Leave a comment