Hi Marc,

Here is a wsgi search query from our server:

http://webgis.uster.ch/wsgi/search.wsgi?searchtables=&query=Werriker&cb=stcCallback1005

Note that there are builtin searchtables that are always used (things like addresses, parcel numbers, building assurance numbers, geographic names, etc.) - you can add additional searchtables e.g. for waste-water pipes, etc.

The double query parameter is a mistake and stems from the fact that it is by mistake also specified in GlobalOptions.js - look for a line with

Konsole output
varsearchBoxQueryURL = "/wsgi/search.wsgi?";

and remove the extra query parameter. But it is not a big deal, the second parameter just replaces the empty one.

Other than that you must check the database permissions and if the login parameters are correct.

In the file "search.js" you have to add the default searchtables array, if you did not specify one in the URL - something like:

Konsole output
searchtables = ['surveydata.searchtable_addresses','gisdata.searchtable_geographicnames'];

So please double check that your searchtables can be accessed with the permissions of the web server user, if the login data is correct and if the searchtables are specified and contain a valid structure.

Hope this helps,
Andreas

On 15.06.2015 17:46, Marc B wrote:
Hello List,

I am trying to connect the WSGI-Search to my PostGIS-Database.
Unfortunately I am reatively new to python and I dont really understand
which changes in the search.wsgi/qwc_connect.py I have to make.

I've created a DB-table like the one from the github instructions.
I've changed the DB_CONN_STRING in qwc_connect.py.

Some of my Questions are

1. Is there a way to easily test my DB-Connection in qwc_connect?
2. The generated URL with parameters is not how ist supposed to be:
    
https://my-page.de/wsgi/search.wsgi?query=&searchtables=&query=wo&cb=stcCallback1001

    - Why are there 2 'query'-params, an empty and a correct one?
    - the searchtables-parameter has no value, whether I put in a
      tablename in the search.wsgi or not ( searchtables =
      ['searchtable']; # enter your default searchtable(s) here ). Where
      does this parameter come from? What am i doing wrong?

If I paste the url in the url bar of chrome it says "error: no search
table". When I put a searchtable-value in the url i get a blank page.
It never says 'error: could not execute query'. So I guess, it doesnt
even get that far.

Thank you
Marc
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to