| When setCriteria(c) is invoked on a FullTextQuery, the user will hit: org.hibernate.search.exception.SearchException: HSEARCH000105: Cannot safely compute getResultSize() when a Criteria with restriction is used. Use query.list().size() or query.getResultList().size(). on using getResultSize() even if there are no restrictions being applied. It would be nice to allow this in this case; ideally by auto-detecting that it is safe, or failing that by providing an ad-hoc option. |