[hibernate-dev] HSEARCH-615 Support time-constrained queries returning the first available results
Emmanuel Bernard
emmanuel at hibernate.org
Fri Nov 5 13:00:46 EDT 2010
If you can find better name for the API, please advise. I am not happy with the current version
Query luceneQuery = ...;
FullTextQuery query = fullTextSession.createFullTextQuery(luceneQuery, User.class);
//define the timeout in seconds
query.limitFetchingTime(500, TimeUnit.MILLISECONDS);
List results = query.list();
if ( query.hasPartialResults() ) {
displayWarningToUser();
}
Emmanuel
More information about the hibernate-dev
mailing list