You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by KÖLL Claus <C....@TIROL.GV.AT> on 2007/12/06 09:13:47 UTC

lower case search bug ?

hi,

i have found that if i try to perform a xpath like search with fn:lower-case like this

"//element(*, nt:base)[jcr:like(fn:lower-case(@my:keywords), 'KEY%')]"

i get results even though the search string is uppercase.

so i have modified the testcase UpperLowerCaseQueryTest.testLikeComparison() to this 

check(new String[]{"foo"},"like", "FO%", new boolean[]{true});

and junit says all ok ...

if i try to use the "=" comparison with a lower-case it only returns results if the search string is also lowercase.

bug ?

BR,
claus

Re: lower case search bug ?

Posted by Marcel Reutegger <ma...@gmx.net>.
KÖLL Claus wrote:
> so i have modified the testcase UpperLowerCaseQueryTest.testLikeComparison() to this 
> 
> check(new String[]{"foo"},"like", "FO%", new boolean[]{true});
> 
> and junit says all ok ...
> 
> if i try to use the "=" comparison with a lower-case it only returns results if the search string is also lowercase.
> 
> bug ?

I'd say so. can you please create a jira issue? thanks

regards
  marcel

AW: lower case search bug ?

Posted by KÖLL Claus <C....@TIROL.GV.AT>.
the resulting xpath search in the testcase looks like this

testroot/*[jcr:like(fn:lower-case(@prop1), 'FO%')]

BR,
claus

-----Ursprüngliche Nachricht-----
Von: KÖLL Claus [mailto:C.KOELL@TIROL.GV.AT] 
Gesendet: Donnerstag, 06. Dezember 2007 09:14
An: dev@jackrabbit.apache.org
Betreff: lower case search bug ?


hi,

i have found that if i try to perform a xpath like search with fn:lower-case like this

"//element(*, nt:base)[jcr:like(fn:lower-case(@my:keywords), 'KEY%')]"

i get results even though the search string is uppercase.

so i have modified the testcase UpperLowerCaseQueryTest.testLikeComparison() to this 

check(new String[]{"foo"},"like", "FO%", new boolean[]{true});

and junit says all ok ...

if i try to use the "=" comparison with a lower-case it only returns results if the search string is also lowercase.

bug ?

BR,
claus