My guess is that you're using PostgreSQL, or something similar with
case-sensitive search by default? Usually "like" is case insensitive.
If it is PostgreSQL, you could use "ilike" in place of "like" will
work
for case insensitive search, otherwise (better solution) just set both
strings to uppercase (UPPERCASE() or UCASE() is the syntax I think,
check he Hibernate documentation if either won't work).
I had thought this was resolved back in March though?
-----Original Message-----
From: anujssharma86(a)yahoo.co.in [mailto:anujssharma86@yahoo.co.in]
Sent: 28 August 2007 06:01
To: xwiki-users(a)objectweb.org
Subject: [xwiki-users] xwiki case sensitive search
Hi,
I am working on XWiki. Presently the search tool for searching in
attachment contents is case sensitive .If I want to make it case
insensitive, what changes I have to make in its code.
Here is the code for attachment content search in xwiki.
Search in attachment file content
#set($sql= ", XWikiAttachment attach, XWikiAttachmentContent as attachc
where doc.id = attach.docId and attach.id = attachc.id and
attachc.content like '%$text%' ")
#foreach ( $item in $xwiki.searchDocuments($sql , $nb , $start))
#if ($xwiki.hasAccessLevel("view", $context.user,
"${context.database}:${item}"))
#set($bentrydoc = $xwiki.getDocument($item)) *
[$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] by
$xwiki.getLocalUserName($bentrydoc.author) on
$xwiki.formatDate($bentrydoc.date, $formatDate)
#end
#end
Thanks,
Anuj