On 24 Sep 2007, at 23:17, Mark Waschkowski wrote:
I saw from earlier messages that there is a function 'fn:lower-
case' to
allow searches to be done by making search criteria lower case, but
I need
something a bit less constrained. We have data in a repository that
has a
title with case, and an input box that our users can input values
to search
on (for said title). They may not be sure of the case of the title,
so we
need to do a case insensitive search.
ie.
Stored as: "The Big Company"
Input as: Big company
and see a hit in the results. Does jackrabbit support this?
The fn:lower-case doesn't necessarily apply to the search string. It
can apply to the field you're searching, so you'd get exactly what
you're after.
Eg. I do something like
String queryString = "/jcr:root/nen:content" + path + "//element
(*,nen:tag)[jcr:like(fn:lower-case(@nen:tag),'" + queryString + "%')]";
The queryString I've already converted to lowercase using plain java
method.
--
Torgeir Veimo
[EMAIL PROTECTED]