gavin wrote:
OK, so it perhaps doesn't work. Looks like the query parser doesn't like two "function calls" right beside each other.
So, do like I said the first time, and use createSQLQuery().
We're going to want to be able to do searches that combine freetext searches with constraints on other columns that are already mapped in hbm.xml files. Using createSQLQuery() would mean having to wire in table column names, creating what would be unnecessary duplication if we could mix and match the HQL and SQL we need. We'd have to do this for all our tables that have fulltext indexes.
(Additionally, though I think it's unlikely, if we wanted to search over multiple types of Domain Object then even those objects that don't have fulltext indexes would have to be searched with a regular SQL query so they can be joined with those that have and have the search results paged back by Hibernate.)
Wouldn't it be better to modify the query parser to enable it to deal with juxtaposed function calls?
Presumably you're saying that in the query:
Code:
from Group g
where match(g.name, g.description) against ('Some Text')
that
Code:
match
and
Code:
against
are parsed as separate function calls?