I am searching against a single Domain class, but also trying to allow wildcard queries against 2 String fields, I understand wildcard (first character) queries are supposed to be inefficient however if only against 2 fields, then perhaps that's not so significant.
I'm trying to accomplish what would be the follow as a criteria query..
MyDomain.createCriteria().list {
and {
notEqual('deleted',true)
or {
ilike('field1','%' + searchText + '%')
ilike('field2','%' + searchText + '%')
}
}
}
Any suggestions much appreciated, thanks.
a lucene query would look like: