Steve,<br> I wrote such program and added a filter to it and then wrote back the mapfile. It doesnt add any extra escape chars or anything like that. Another point which I forgot to mention is that the datatype of this name_hutment_dweller_souindics column is tsvector
<br> Due to this, the mapserver complains that it cannot cast a tsvector to text. Does this mean that mapserver casts query field to text and then does query?<br><br>bye<br><br><div><span class="gmail_quote">On 2/26/07,
<b class="gmail_sendername">Steve Lime</b> <<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There could be some string escaping going on in php or MapServer itself<br>perhaps?<br>If you could try one more thing it might help debug.<br><br>In PHP write a quick script that does this:<br><br>- open the mapfile<br>- open the layer
<br>- use the layer setFilter method to set it to<br>"name_hutment_dweller_souindics @@ '(GPN)|(TKRM)'::tsquery"<br>- save the mapfile<br><br>What does the saved FILTER string look like?<br><br>Steve<br>
<br>>>> Swapnil Hajare <<a href="mailto:dreamil@GMAIL.COM">dreamil@GMAIL.COM</a>> 2/26/2007 2:24:16 AM >>><br>Steve,<br> I added a filer like this in my mapfile<br> FILTER "name_hutment_dweller_souindics @@
<br>'(GPN)|(TKRM)'::tsquery"<br> and I generated png from mapfile using shp2img. I can see matching<br>polygins displayed in the image, That means postGIS is processing the<br>query<br>correctly. Is it the queryByAttributes which is making mistake then?
<br><br><br>regards,<br><br>On 2/18/07, Steve Lime <<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>> wrote:<br>><br>> MapServer or MapScript passes the query string directly on to the
<br>> PostGIS driver so<br>> it's likely there the problem lies (if there is one). What happens<br>if<br>> you set a FILTER<br>> in the map file using that operator and use shp2img? That might help<br>in<br>
> debugging<br>> this since queryByAttributes simply resets the layer filter<br>temporarily.<br>><br>> Steve<br>><br>> >>> Swapnil Hajare <<a href="mailto:dreamil@GMAIL.COM">dreamil@GMAIL.COM
</a>> 02/16/07 10:14 PM >>><br>> Hi list,<br>> first greetings to the list.<br>> I am using mapserver 4.8.3 (ubuntu edgy package) with<br>postgis-pgsql<br>> 8.1<br>> and php5-mapscript.<br>> I am trying to implement full text search engine for Marathi-
<br>> Devanagari<br>> text (mr_IN) using tsearch2 extension of pgsql. In my map, I am<br>> providing a<br>> search interface (which is based on kamap & mapscript), to type text<br>in<br>> Marathi and search it in my postgis layer. For string comparison in
<br>> queryByAttributes, I get results when I use ~* operator. But I don't<br>get<br>> any<br>> results when I try to use @@ operator. is it that this operator is<br>not<br>> supported by mapscript? I thought anything supported by pgsql, should
<br>be<br>> available in mapscript also. Please guide me on this.<br>><br>> regards,<br>><br>><br>> --<br>> Swapnil Hajare<br>><br>><br><br><br>--<br>Swapnil Hajare<br></blockquote></div><br><br clear="all">
<br>-- <br>Swapnil Hajare