Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Tim Englich ha scritto: Hello Jody, our problem ist that the user type his searcvalue wrong. For Example victoria street instead of Victoria Street. We would like to provide that the Features were also found if the user types some characters in the wrong caselevel (upperCase or Lowercase). I know that Oracle provides the function lower (lower(columnName) like 'foo') to provide a comparation which is caseinsensitive. A quick and dirty workaround would be to define a view that has the lower inside, search, get back the fids, and then do a fid query against the original feature type. Messy for sure, but also something you can do without having to fiddle against GeoServer/GeoTools code. Cheers Andrea - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Interesting, could we define a function for geotools called lower and have it map to the SQL lower function? Sounds like the best solution to me, Jody Tim Englich wrote: Hello Jody, our problem ist that the user type his searcvalue wrong. For Example victoria street instead of Victoria Street. We would like to provide that the Features were also found if the user types some characters in the wrong caselevel (upperCase or Lowercase). I know that Oracle provides the function lower (lower(columnName) like 'foo') to provide a comparation which is caseinsensitive. Tim -Ursprüngliche Nachricht- Von: Jody Garnett [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 9. August 2007 00:50 An: Andrea Aime Cc: Tim Englich; Justin Deoliveira; geotools-gt2-users@lists.sourceforge.net Betreff: Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv Agreed; so if I understand things correctly SQL only supports % and _ wildcards - there is no more complete regular expression support? Tim could use use a disjunction to search for foo OR FOO? seems to be a messy problem from the SQL side of things... Jody Andrea Aime wrote: Tim Englich ha scritto: Hello Jusitin, Hello Jody, for solving my problem in GT 2.3.x I am thinking about a switch which could be set to LikeFilterImpl Class. If the switch is set the String-Values which should be compared will get a toLowerCase() Method call first. Tim, this will work only if the filter is evaluated in memory. If the same filter is converted into a sql statement (because it's used to access data in a dbms) your patch won't work. Cheers Andrea - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Agreed; so if I understand things correctly SQL only supports % and _ wildcards - there is no more complete regular expression support? Tim could use use a disjunction to search for foo OR FOO? seems to be a messy problem from the SQL side of things... Jody Andrea Aime wrote: Tim Englich ha scritto: Hello Jusitin, Hello Jody, for solving my problem in GT 2.3.x I am thinking about a switch which could be set to LikeFilterImpl Class. If the switch is set the String-Values which should be compared will get a toLowerCase() Method call first. Tim, this will work only if the filter is evaluated in memory. If the same filter is converted into a sql statement (because it's used to access data in a dbms) your patch won't work. Cheers Andrea - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Hello Jusitin, Hello Jody, for solving my problem in GT 2.3.x I am thinking about a switch which could be set to LikeFilterImpl Class. If the switch is set the String-Values which should be compared will get a toLowerCase() Method call first. Might this be a possible way which could be integrated into the GeoTools SourceCode? Tim -Ursprüngliche Nachricht- Von: Justin Deoliveira [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 2. August 2007 22:09 An: Jody Garnett Cc: Tim Englich; geotools-gt2-users@lists.sourceforge.net Betreff: Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv Filter 1.1 supports case insensitive matching but only on PropertyIsEqualTO and PropertyIsNotEqualTo elements. None of the other comparison elements support it. I guess it kind of makes sense why... although you could probably make a case of PropertyIsLike... -Justin Jody Garnett wrote: Thinking; I thought I saw a switch for that in the Filter 1.1 specification. here it is isMatchingCase but it is only for the binary comparison operators. Justin is this an oversight on the part of the specification? Or it it a case where a user is supposed to produce a regular expression that matches mixed case? Cheers, Jody Tim Englich wrote: Hello, I am searching for a possibility to use the LikeFilter caseinsensitiv serveral times. I am using the GeoTools 2.3.1 release. I didn't find a possibility yet. Has anyone an idea how I can do this? - Tim - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,46b204c7121301137850744! -- Justin Deoliveira The Open Planning Project http://topp.openplans.org - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Tim Englich ha scritto: Hello, I am searching for a possibility to use the LikeFilter caseinsensitiv serveral times. I am using the GeoTools 2.3.1 release. I didn't find a possibility yet. Has anyone an idea how I can do this? With the current code you cannot, afaik. You could try to roll your own case insensitive likefilter by subclassing LikeFilterImpl I guess, but then you would also have to alter the sql filter encoders to generate a case insensitive matching sql code (I don't think the sql92 standard allows for this, but some database might), otherwise the sql encoders would keep on encoding the case sensitive version. Alternatively, I think you can create a new filter function, FilterFunction_strToUpperCase, register it in the SPI subystem (look how other filter functions are registered in the text files in META-INF) and then upcase before doing like. Beware that doing so will mean the filter won't be passed anymore to the eventual database, since the datastore would not be able to encode the toUpperCase function. Hope this helps Cheers Andrea - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] Is it possible to use the LikeFilter Caseinsensitiv
Filter 1.1 supports case insensitive matching but only on PropertyIsEqualTO and PropertyIsNotEqualTo elements. None of the other comparison elements support it. I guess it kind of makes sense why... although you could probably make a case of PropertyIsLike... -Justin Jody Garnett wrote: Thinking; I thought I saw a switch for that in the Filter 1.1 specification. here it is isMatchingCase but it is only for the binary comparison operators. Justin is this an oversight on the part of the specification? Or it it a case where a user is supposed to produce a regular expression that matches mixed case? Cheers, Jody Tim Englich wrote: Hello, I am searching for a possibility to use the LikeFilter caseinsensitiv serveral times. I am using the GeoTools 2.3.1 release. I didn't find a possibility yet. Has anyone an idea how I can do this? - Tim - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users !DSPAM:4007,46b204c7121301137850744! -- Justin Deoliveira The Open Planning Project http://topp.openplans.org - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users