Steve,<br>&nbsp; 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>&nbsp; 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> &lt;<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>&gt; 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>&quot;name_hutment_dweller_souindics @@ &#39;(GPN)|(TKRM)&#39;::tsquery&quot;<br>- save the mapfile<br><br>What does the saved FILTER string look like?<br><br>Steve<br>
<br>&gt;&gt;&gt; Swapnil Hajare &lt;<a href="mailto:dreamil@GMAIL.COM">dreamil@GMAIL.COM</a>&gt; 2/26/2007 2:24:16 AM &gt;&gt;&gt;<br>Steve,<br>&nbsp;&nbsp;I added a filer like this in my mapfile<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FILTER &quot;name_hutment_dweller_souindics @@
<br>&#39;(GPN)|(TKRM)&#39;::tsquery&quot;<br>&nbsp;&nbsp;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 &lt;<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>&gt; wrote:<br>&gt;<br>&gt; MapServer or MapScript passes the query string directly on to the
<br>&gt; PostGIS driver so<br>&gt; it&#39;s likely there the problem lies (if there is one). What happens<br>if<br>&gt; you set a FILTER<br>&gt; in the map file using that operator and use shp2img? That might help<br>in<br>
&gt; debugging<br>&gt; this since queryByAttributes simply resets the layer filter<br>temporarily.<br>&gt;<br>&gt; Steve<br>&gt;<br>&gt; &gt;&gt;&gt; Swapnil Hajare &lt;<a href="mailto:dreamil@GMAIL.COM">dreamil@GMAIL.COM
</a>&gt; 02/16/07 10:14 PM &gt;&gt;&gt;<br>&gt; Hi list,<br>&gt;&nbsp;&nbsp; first greetings to the list.<br>&gt;&nbsp;&nbsp; I am using mapserver 4.8.3 (ubuntu edgy package) with<br>postgis-pgsql<br>&gt; 8.1<br>&gt; and php5-mapscript.<br>&gt;&nbsp;&nbsp; I am trying to implement full text search engine for Marathi-
<br>&gt; Devanagari<br>&gt; text (mr_IN) using tsearch2 extension of pgsql. In my map, I am<br>&gt; providing a<br>&gt; search interface (which is based on kamap &amp; mapscript), to type text<br>in<br>&gt; Marathi and search it in my postgis layer.&nbsp;&nbsp;For string comparison in
<br>&gt; queryByAttributes, I get results when I use ~* operator. But I don&#39;t<br>get<br>&gt; any<br>&gt; results when I try to use @@ operator. is it that this operator is<br>not<br>&gt; supported by mapscript? I thought anything supported by pgsql, should
<br>be<br>&gt; available in mapscript also. Please guide me on this.<br>&gt;<br>&gt; regards,<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Swapnil Hajare<br>&gt;<br>&gt;<br><br><br>--<br>Swapnil Hajare<br></blockquote></div><br><br clear="all">
<br>-- <br>Swapnil Hajare