Hmm, my origional reply got rejected/did not send for some reason.. Problem is that MySQL is default case-insensitive; so LIKE is working fine for MySQL queries. eg: select doc.name from XWikiDocument doc where doc.fullName like '%thistest' above will be case-insensitive on MySQL. PostgreSQL treats LIKE queries as case-sensitive; so to make it case-insensitive you would have to use ilike (extra i in front of like) to make it case-insensitive. eg: select doc.name from XWikiDocument doc where doc.fullName ilike '%thistest' above (should, far as I can recall) be case-insensitive on PostgreSQL, but again may not work with MySQL. I would have thought Hibernate fixes this kind of discrepency though? ________________________________ From: Sergiu Dumitriu [mailto:[email protected]] Sent: 27 March 2007 08:50 To: [email protected] Subject: Re: [xwiki-users] Re: Case insensitive search On 3/27/07, Zeljko Trogrlic <[email protected]> wrote: >> >> Hi, >> >> I noticed that XWiki does case sensitive search, e.g. if I search for >> "available", available will be found, but not "Available." >> >> How can I make searches case insensitive? >> >> >> The search page should be case insensitive. If it is not, then it >> might be a bug. > > it's a bug... I don't know if we have a jira issue. I heard this issue > from another user 2 days ago and I remember seeing it myself. I'm using PostgreSQL as backend, could that be the source of the problem? How actually searching works? Using database functions? If you give me a hint where is it done (in code) I can investigate the problem. Check the code for Main.WebSearch , its a series of hibernate hql queries. The string is searched with "where field LIKE '$keyword'", so if LIKE is not case insensitive, this is the cause. >> Speaking of searching, it not clear to me what happens if I turn on >> Lucene. Does this replace searching back-end for regular search >> box, or >> I have to add new page for searching? >> >> >> No, it does not replace normal search. You will have to write a search >> page that uses Lucene. Maybe we should have this page in the Code area >> on xwiki.org <http://xwiki.org>. > > We already have it :-) > > http://www.xwiki.org/xwiki/bin/view/Code/LucenePlugin It was not clear to me does it replace regular search, thanks for the answer. I will add search box integration to JIRA for future reference, and I think that this should be stated on plugin page, because description is a bit misleading: "It can be used in place of the default search implementation..." Sergiu -- http://purl.org/net/sergiu