Hibernate Search OneToMany Confuse Result

I don’t know how this API works but something bother me. It seems that createQuery create a new instance of MustJunction. You just need to put the result of your builder in your variable. mobdro

like this :

MustJunction term = qb.bool().must(qb.keyword().onField("saleLogs.customer").matching("Jack").createQuery());

 term = term.must(qb.keyword().onField("saleLogs.address").matching("London").createQuery())
 List<Book> books = fullTextSession.createFullTextQuery(term.createQuery()).list();

I hope it helps…