mirror of https://github.com/apache/lucene.git
Mark TimeLimitingCollector as deprecated (#13220)
Co-authored-by: Kaival Parikh <kaivalp2000@gmail.com>
This commit is contained in:
parent
42a5ff6ace
commit
878d233bc1
|
@ -31,8 +31,6 @@ import org.apache.lucene.util.automaton.CompiledAutomaton;
|
|||
* {@link QueryTimeout} implementation object to be checked periodically to see if the thread should
|
||||
* exit or not. If {@link QueryTimeout#shouldExit()} returns true, an {@link ExitingReaderException}
|
||||
* is thrown.
|
||||
*
|
||||
* @see org.apache.lucene.search.TimeLimitingCollector
|
||||
*/
|
||||
public class ExitableDirectoryReader extends FilterDirectoryReader {
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@ import org.apache.lucene.index.LeafReaderContext;
|
|||
* <li>{@link TopFieldCollector} subclasses {@link TopDocsCollector} and sorts according to a
|
||||
* specified {@link Sort} object (sort by field). This is used internally by the {@link
|
||||
* IndexSearcher} search methods that take an explicit {@link Sort}.
|
||||
* <li>{@link TimeLimitingCollector}, which wraps any other Collector and aborts the search if
|
||||
* it's taken too much time.
|
||||
* <li>{@link PositiveScoresOnlyCollector} wraps any other Collector and prevents collection of
|
||||
* hits whose score is <= 0.0
|
||||
* </ul>
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.apache.lucene.search;
|
|||
|
||||
import java.io.IOException;
|
||||
import org.apache.lucene.index.LeafReaderContext;
|
||||
import org.apache.lucene.index.QueryTimeout;
|
||||
import org.apache.lucene.util.Counter;
|
||||
import org.apache.lucene.util.SuppressForbidden;
|
||||
import org.apache.lucene.util.ThreadInterruptedException;
|
||||
|
@ -27,8 +28,10 @@ import org.apache.lucene.util.ThreadInterruptedException;
|
|||
* maximum allowed search time limit. After this time is exceeded, the search thread is stopped by
|
||||
* throwing a {@link TimeExceededException}.
|
||||
*
|
||||
* @deprecated Use {@link IndexSearcher#setTimeout(QueryTimeout)} to time out queries.
|
||||
* @see org.apache.lucene.index.ExitableDirectoryReader
|
||||
*/
|
||||
@Deprecated
|
||||
public class TimeLimitingCollector implements Collector {
|
||||
|
||||
/** Thrown when elapsed search time exceeds allowed search time. */
|
||||
|
|
Loading…
Reference in New Issue