3

We are using grails 2.1.1 and searchable - 0.6.3

We are trying to filter results using query builder. Our problem is that we cannot put a check on tupples having null in a field. We have gone through lots of documentation but couldn't find any solution.

Is there a way to put a null value check using query builder in grails searchable plugin.

using

mustNot(term('columnName',null))

or

mustNot(term('columnName','null'))

does not work.

Wasim
  • 896
  • 7
  • 24
  • The way we solved this was to map the null values to something like -1 or something while indexing and exclude -1 in query builder – Karthick AK Jan 09 '14 at 19:05
  • Could you put more detail of your solution in as an answer. This is what I am looking for. – DavidC Mar 25 '14 at 17:48

1 Answers1

0

Try this:

mustNot(gt("columnName", 0))