Hi,
I am trying to use mapserver to generate image maps from a PostGIS connection
based upon a user entered FILTER. The data column I am trying to filter by is a
tsvector column type. So the FILTER for my LAYER looks something like this:
FILTER "textsearchable_index_col @@ to_tsquery('search terms')"
I do have things working where I can hard code the FILTER for the LAYER in the
MAP file. Things work great and I am very happy about this. The problem lies
that I would now like to allow my client application to change this FILTER
dynamically through a URL request based upon what search terms the user enters.
So the URL would look something like this:
http://.../mapserv?map.layer[layername].filter=%22textsearchable_index_col%20@@%20to_tsquery%28%27newsearchterms%27%29%22&mode=map&map=mapfile.map&layers=layername&map_imagetype=png&mapext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&imgext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&map_size=1870+1321&imgx=935&imgy=660.5&imgxy=1870+1321
I am getting the following error:
loadLayer(): Unknown identifier. Parsing error near (textsearchable_index_col
@@ to_tsquery('newsearchterms')):(line 1)
Through looking around a little, I believe the "@@" special characters in the
filter parameter are causing the issue. Can anyone confirm that this is may be
the case (or think of what else may be the issue) and suggest a workaround
(escaping these characters in some way, etc.)?
Thanks,
Scott
********************************************* Scott Pezanowski
email: [email protected]
*********************************************
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users