grailssearchablegrails-searchable

how to write this grails searchable query


In a grails project, some of the domain classes have a "region" field (not all of them). The logged in user is belonged to one the regions. I want to search those objects that 1- Does not have a region field OR 2- Their region field is equal to current user's region

How to handle this?


Solution

  • I solved it by an alternative method. I used a property with special unique value on region and added it to search query.