[Geoserver-users] case insensitiv wfs filter

Hi guys,

sorry for cross-posting.

I am using a geoserver(2.0.1) as a wfs-service with a postgresql
database and openlayers to show the data.

There is a possibility for the user to search data
within this openlayers application. I am using the
entered searchstring to form a getfeature request.

I am using the filter-function for this:

<ogc:propertyislike wildCard=“*” singleChar=“.” escape=“!”>
ogc:propertynameinstitutio</ogc:propertyname>
ogc:literalgeographie</ogc:literal>
</ogc:propertyislike>

The problem is that when a user enters a string which is differs only
a tiny bit to the string in the database (case sensitive), the
entry cannot be found. For example: gEoGrApHiE, geographie, GEOGRAPHIE, Geographie.

Can someone help me to create a case insensitiv application using
openlayers, geoserver and postgresql.

I already found the “matchCase”-option in openlayers, but this
can only be used for EQUAL_TO filters which is not of any help
for me.

Hi ?

this is not a solution but an idea to tackle the problem:
you might want to use lower case only
1) in your web-application use JavaScript's toLowerCase() to convert the users' input before writing the filter
2) on the postgres side address a view where the field in question is created by SELECT lower(varchar_field) FROM relation

hope this helps

Gruesse

Benno

info@anonymised.com schrieb:

Hi guys,

sorry for cross-posting.

I am using a geoserver(2.0.1) as a wfs-service with a postgresql
database and openlayers to show the data.

There is a possibility for the user to search data
within this openlayers application. I am using the
entered searchstring to form a getfeature request.

I am using the filter-function for this:

<ogc:propertyislike wildCard="*" singleChar="." escape="!">
<ogc:propertyname>institutio</ogc:propertyname>
<ogc:literal>*geographie*</ogc:literal>
</ogc:propertyislike>

The problem is that when a user enters a string which is differs only
a tiny bit to the string in the database (case sensitive), the
entry cannot be found. For example: gEoGrApHiE, geographie, GEOGRAPHIE,
Geographie.

Can someone help me to create a case insensitiv application using
openlayers, geoserver and postgresql.

I already found the "matchCase"-option in openlayers, but this
can only be used for EQUAL_TO filters which is not of any help
for me.

________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com

------------------------------------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com

________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com