| This:
SearchResult<Book> result = Search.getSearchSession(em).search(Book.class)
.predicate(f -> f.matchAll())
.fetch(20, 0);
will become this:
SearchResult<Book> result = SearchSession.get(em).search(Book.class)
.predicate(f -> f.matchAll())
.fetch(20, 0);
Keep Search.getSearchSession() for now, but implement it as a redirection to SearchSession.get(), and deprecate it. Be sure to replace every use of Search.getSearchSession() in our code with the new syntax. |