[Geoserver-devel] [JIRA] (GEOS-7224) CQL_FILTER=strToLowerCase(attribute) not returning expected records

Rob Flemming created an issue

GeoServer / BugGEOS-7224

CQL_FILTER=strToLowerCase(attribute) not returning expected records

Issue Type:

BugBug

Affects Versions:

2.6.2

Assignee:

Unassigned

Components:

PostGIS

Created:

30/Sep/15 11:47 PM

Environment:

Ubuntu 14.04.3, Oracle JRE for Server

Labels:

CQL strToLowerCase

Priority:

MediumMedium

Reporter:

Rob Flemming

I am trying to query (for example) a Geoserver layer based on a PostGIS table with the attribute ‘well_owner’, 177 of which contain ‘NANAIMO’ and 6 ‘Nanaimo’.
I get all of the UPPERCASE features with the following request:
https://192.168.122.12/geoserver/wfs?service=WFS&request=GetFeature&version=2.0.0&typename=waterline:vw_bc_wells&srsname=EPSG:3857&outputFormat=JSON&count=500&PROPERTYNAME=well_owner&CQL_FILTER=well_owner%20like%20%27%25NANAIMO%25%27
…and all of the lowercase if I change the url to:
https://192.168.122.12/geoserver/wfs?service=WFS&request=GetFeature&version=2.0.0&typename=waterline:vw_bc_wells&srsname=EPSG:3857&outputFormat=JSON&count=500&PROPERTYNAME=well_owner&CQL_FILTER=well_owner%20like%20%27%25Nanaimo%25%27
…but if I try to filter the attribute to lower case as follows, I get only four, one of which has ‘Nanaimo’ and three which have ‘NANAIMO’!?
https://192.168.122.12/geoserver/wfs?service=WFS&request=GetFeature&version=2.0.0&typename=waterline:vw_bc_wells&srsname=EPSG:3857&outputFormat=JSON&count=500&CQL_FILTER=strToLowerCase(well_owner)%20like%20%27%25nanaimo%25%27

(and maybe another issue, if I include &PROPERTYNAME in the strToLowerCase filter, I get zero results).

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.0.0-OD-07-011#70107-sha1:db940e9)

Atlassian logo