The query you've created interprets to, essentially: MUST match (query OR isPublished = true)
, or, using lucene's syntax +(query isPublished:true)
If I understand correctly, what you want is that it must match both clauses (that is: +query +ispublished:true
), so something like:
search {
must(queryString(query))
must(term("ExhibitionPrint.exhibition.isPublished", true))
}