Closed ilijastojkovic closed 11 years ago
which PHPCR implementation did you use?
we use jackrabbit
ok .. this is surprising. afaik CONTAINS(), which we are using, is case insensitive. will investigate.
i thought the queries are case insensitive. (i would expect issues with jackalope-doctrine-dbal with postgres and maybe sqlite)
but indeed http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.19%20FullTextSearch does not say anything.
there is the LOWER function in sql2. maybe we should strtolower the search string and LOWER() the field we search on? but i am afraid what the performance impact would be. if we are unlucky, jackrabbit would stop using lucene then and compare in-memory...
hmm it seems to work as expected: http://cmf.liip.ch/search?query=CMF vs. http://cmf.liip.ch/search?query=cmf which also uses Jackrabbit.
and this is the search query that is generated:
SELECT [jcr:uuid], [phpcr:class], title, body FROM [nt:unstructured] WHERE ((ISDESCENDANTNODE([/cms/content]) AND (CONTAINS(title, 'cmf') OR CONTAINS(body, 'cmf'))) AND NAME([nt:unstructured]) = 'phpcr_locale:en')
so it should work case insensitive with Jackrabbit. for Doctrine DBAL it seems to also work on SQlite at least.
please close this issues - this is working - what is not working is the search in the sonata admin bundle - which is case sensitive
Do you know, how I can ignore lower and upper letters in search query? i.e. If I type search query "Git" or "git", I want to get the same search results.