SQL queries are not part of the JCR 170 spec. This means that you're tied to the Jackrabbit implementation of JCR 170 if you decide to use SQL syntax to query the repository.
The guys from Jackrabbit warn that it is possible the current SQL query handler implementation which allows piping of Lucene syntax may change in the future if they move to a different index implementation.
Okedoke. Now for the story.
Exact matches (name contains 'Ooga Booga') ; variations could be a case insensitive search.
I am trying to change the analyzer that Lucene would use for these searches. But haven't met with any success. I changed the required settings in the repository.xml, and the workspace.xml file. But I don't seem to be getting the required output.
Have you tried it, and has it worked successfully?