conterra / mapapps-query-builder

The Query Builder Bundle allows you to create your own Query Tools, that perform custom queries to a store.
https://demos.conterra.de/mapapps/resources/apps/downloads_query_builder/index.html
Apache License 2.0
7 stars 6 forks source link

complexQuery without wildcard character in front of request #19

Closed LVermGeoSH closed 6 years ago

LVermGeoSH commented 6 years ago

The dn_querybuilder for map.apps 4 do not Support "Wildcard"definition/-automation for Requests against AGS-Services for isLike field-konfiguration

In dn_querybuilder line 4 the request against the AGS looks like: …/MapServer/0/query?f=json&orderByFields=&outFields=*&where=LOWER(NAME) like 'during%'

dn_querybuilder Linie3 …/MapServer/0/query?f=json&where=(LOWER(NAME)%20like%20%27%25during%25%27)&returnGeometry=true&outFields=*&orderByFields=&callback=dojo.io.script.jsonp_dojoIoScript3._jsonpCallback

You can see that the requestin line 4 is without leading "%" or (%27). In line 4 the Wildcard ist only after the searchstring. So the resultcenter Shows only results with leading string "during" not as in line 3 results where "during" is containing in the searchfield at any Position.

There is also a con terra Support ticket for this case (#CRN20393),

matthiasstein commented 6 years ago

I can't reproduce the described behavior.

Which relational operator do you use? "is (wildcard) [german: ist gleich (wildcard)]" or suggest [german: ähnelt]? Which map.apps version do you use?

I used the suggest operator and this service: https://services.conterra.de/arcgis/rest/services/training/stoerungen/MapServer/0 Linie 3: where=LOWER(details) like '%vermüllung in der innenstadt%' Linie 4: where=LOWER(details) like '%vermüllung in der innenstadt%'

Is your service freely accessible? I would try to reproduce this issue with your service.

LVermGeoSH commented 6 years ago

The retional Operator is "suggest" [german:ähnelt] and the map.apps Version is 4.4.2 with dn_querybuilder 4.1.1.

The connected Service is not freely accesible. it is a AGS-Mapserver 10.2.2.

Is your request realized with the bundle? Because the request in my comment are screened with F12 in any Browser. So there is no leading % in line 4.

LVermGeoSH commented 6 years ago

@matthiasstein

The attached AGS is now "freely" accessable. But I would like to communicate the URL in con terra call #CRN20393. is this ok?

LVermGeoSH commented 6 years ago

but the request i logged for an input field (suggest relation) in complexQuery of dn_querybuilder 4.1.1

..../MapServer/0/query?f=json&orderByFields=&outFields=*&where=LOWER(KATEGORIEN) like 'umwelt%'

So there is no "wildcard" in front of the searchstring in field KATEGORIEN.

matthiasstein commented 6 years ago

I also copied the query from the browser console. Can you also send your app.json to support?

LVermGeoSH commented 6 years ago

i will send my app.json to the con terra ticket number.

in the app i used an internal URL (...rest/services/FACHDATEN/Stiftungen2018_View/MapServer/0), so the map.apps proxy is involved in the communication.

but in dn_querybuilder 3.4.2 map.apps 3.9.5 is it also an internal URL with proxy communication on the same Service and the request looks like

..../MapServer/0/query?f=json&orderByFields=&outFields=*&where=LOWER(KATEGORIEN) like '%umwelt%

LVermGeoSH commented 6 years ago

i've send the app.json and AGS-URL to the ticket number.

matthiasstein commented 6 years ago

Thank you, I can now reproduce the bug and will create a new release that fixes it.

matthiasstein commented 6 years ago

Fixed in https://github.com/conterra/mapapps-query-builder/releases/tag/4.1.3

LVermGeoSH commented 6 years ago

works perfect... thanx