By the way, this code is (from the point of view of Hibernate Search) wrong and fixing it will get rid of the NPE:
You’re not passing any field path, so the predicate will not do anything. You should pass a non-empty array of field paths to fields
.
I suppose this used to target all fields before 6.0.0.Beta6, but that was just by chance; it was not an intended feature. You can create a ticket if targeting all relevant fields instead of passing them explicitly is a valuable feature for you, but I wouldn’t recommend it as it may give end users access to technical fields that you did not intend to expose.