jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre <avdsch...@gmail.com>
Subject Bug when using jcr:contains to search for value containing an underscore
Date Wed, 20 Sep 2006 14:43:13 GMT
I posted this in the developers list yesterday, this is probably a more
appropriate place.

I have a property named "ref" on a node, with a value of "TEST_REFERENCE". I
cannot match this property, apparently due to the underscore. I've read the JCR
spec, the underscore does not need to be encoded. There seems to be a problem
with matching this value using jcr:contains. I cannot use jcr:find because it is
not case sensitive, which is not an option for me. 

These searches fail (finds no results):
/jcr:root/*/_x0034_/_x0031_/_x0032_1/*[jcr:contains( <at> ref,'TEST*')]
/jcr:root/*/_x0034_/_x0031_/_x0032_1/*[jcr:contains( <at> ref,'TEST_REFERENCE')]
/jcr:root/*/_x0034_/_x0031_/_x0032_1/*[jcr:contains( <at> ref,'TEST_REFERENCE*')]

If I change the value to "TESTREFERENCE" or "testReference", the first search
above works.

These searches work:
/jcr:root/*/_x0034_/_x0031_/_x0032_1/*[jcr:like( <at> ref,'TEST%')]
/jcr:root/*/_x0034_/_x0031_/_x0032_1/*[jcr:like( <at> ref,'TEST_REFERENCE%')]

I have tried changing the property name, and the results are the same. I don't
have issues with any other characters. Is this a bug? If so, is there a
workaround, and should I log it on bug tracking?


View raw message