Am Dienstag, 5. September 2006 18:57 schrieb Thomas Martin:
> substituting "like" by "contains" in an sql search statement through
> info.magnolia.cms.core.search.QueryManager does not deliver case
> insensitive results (as opposed to Sameers mail from august 31)?
>

case insensitivity is based on the indexing used.  If you were working 
directly with a RDBMS, then you would have to go to the trouble to set up a 
case insensitive index as previously described.  And write your queries in a 
way that would use your index.

However, since you are probably working with magnolia in a default 
configuration, with default indexing, the indexing is handled by lucene.  
Lucene indexing is configurable.  It can be configured with or without case 
sensitivity. This indexing is used by the contains statement.  Nothing about 
the contains statement specifies case insensitivity.  It simply means, use 
the full text indexing.  That's all handled by the configured full text 
indexer.

That said, the default is case insensitivity.

> if so I can start hacking workarounds if not it would be obvious that
> I'm doing something wrong and hence I would appreciate very much
> pointers where I can find out more about the proper syntax/usage.
>

Shouldn't need to hack a workaround.  Shouldn't need to leave off the first 
character of words, or store the text lowercase.  You should be able to use 
the search field at the bottom left of the website tree to demonstrate that 
queries are case insensitive.  

Alternatively, from whatever comand line tool you use (There are several.  I 
use the user contrib jackrabbit jcr-commands offering) a sql query like:

select * from mgnl:content where contains(title, 'Ein')

should return the same as

select * from mgnl:content where contains(title, 'ein')

with the default setup.  At least it does for me.  Hope this helps.

Cheers,
Chris



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to