]
Emmanuel Bernard commented on HSEARCH-374:
------------------------------------------
The first rev will to go for your approach and raise an exception when a query takes more
than timeout.
I've created HSEARCH-615 to account for what you thought about initially.
Timeout support for full-text searches
--------------------------------------
Key: HSEARCH-374
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-374
Project: Hibernate Search
Issue Type: New Feature
Components: query
Reporter: Benjamin Gniza
Fix For: 3.3.0.Beta3
Attachments: bit-TimeoutPatched-Hibernate-Search-1.0.1EXPERIMENTAL.zip
It would be nice to add support for the TimeLimitedCollector of Lucene (Versions 2.4.0
and above).
We needed that feature in our project within a week so we couldn't wait for a new
official release and had to imlement it on our own.
Check out
https://sourceforge.net/projects/timeoutpatchhib/ for our source (LGPL just as
requested by hibernate).
I attached our current source code to the Jira issue. New versions will be published on
sourceforge, please refer to
https://sourceforge.net/projects/timeoutpatchhib/ for the
most current one. The attached source only includes the code to support the
TimeLimitedCollector.
We also have an experimental version which tries to find the reason of a
BooleanQuery.TooManyClausesException within the offending user search term. For more
information take a look at the sourceforge project.
Note: We didn't overide the query.setTimeout(int) method because we didn't know
if this would have caused other side effects. So we created a method
query.setTimeout(long).
Changed Methods:
- org.hibernate.search.FullTextQuery
-- +isSearchTimoutExceeded()
-- +setTimeout(long)
-- +getTimeout()
- org.hibernate.search.query.FullTextQueryImpl
-- getQueryHits(IndexSearcher, Integer)
-- +isSearchTimoutExceeded()
-- +setTimeout(long)
-- +getTimeout()
- org.hibernate.search.query.QueryHits
-- Constructors
-- scoreDoc(int)
-- updateTopDocs(int)
-- +getTopDocCollector(int)
-- +getHitCollectorForSearch(TopDocCollector)
-- +isTimeLimitExceeded()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: