[Geoserver-devel] [jira] Created: (GEOS-949) PropertyIsLike filter is incorrect

PropertyIsLike filter is incorrect
----------------------------------

                 Key: GEOS-949
                 URL: http://jira.codehaus.org/browse/GEOS-949
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.4.0
         Environment: windows XP, tomcat
            Reporter: Ian Turton
         Assigned To: Andrea Aime
            Priority: Minor

if you run the following query
<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
  <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="." escape="!">
<ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
<ogc:Literal>M*an.</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

you get the following answer:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:topp="http://www.openplans.org/topp&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.openplans.org/topp http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:states http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd&quot;&gt;&lt;gml:boundedBy&gt;&lt;gml:null&gt;unknown&lt;/gml:null&gt;&lt;/gml:boundedBy&gt;
<gml:featureMember>
<topp:states fid="states.5"><topp:STATE_NAME>Maryland</topp:STATE_NAME></topp:states>
</gml:featureMember>
<gml:featureMember>
<topp:states fid="states.24"><topp:STATE_NAME>Michigan</topp:STATE_NAME></topp:states>
</gml:featureMember>
<gml:featureMember>
<topp:states fid="states.25"><topp:STATE_NAME>Montana</topp:STATE_NAME></topp:states>
</gml:featureMember>
</wfs:FeatureCollection>

which would be fine but Michigan shouldn't match that query as singleChar must match 1 character exactly.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira