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
|
* {@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}
|
* exit or not. If {@link QueryTimeout#shouldExit()} returns true, an {@link ExitingReaderException}
|
||||||
* is thrown.
|
* is thrown.
|
||||||
*
|
|
||||||
* @see org.apache.lucene.search.TimeLimitingCollector
|
|
||||||
*/
|
*/
|
||||||
public class ExitableDirectoryReader extends FilterDirectoryReader {
|
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
|
* <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
|
* specified {@link Sort} object (sort by field). This is used internally by the {@link
|
||||||
* IndexSearcher} search methods that take an explicit {@link Sort}.
|
* 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
|
* <li>{@link PositiveScoresOnlyCollector} wraps any other Collector and prevents collection of
|
||||||
* hits whose score is <= 0.0
|
* hits whose score is <= 0.0
|
||||||
* </ul>
|
* </ul>
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.apache.lucene.search;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.apache.lucene.index.LeafReaderContext;
|
import org.apache.lucene.index.LeafReaderContext;
|
||||||
|
import org.apache.lucene.index.QueryTimeout;
|
||||||
import org.apache.lucene.util.Counter;
|
import org.apache.lucene.util.Counter;
|
||||||
import org.apache.lucene.util.SuppressForbidden;
|
import org.apache.lucene.util.SuppressForbidden;
|
||||||
import org.apache.lucene.util.ThreadInterruptedException;
|
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
|
* maximum allowed search time limit. After this time is exceeded, the search thread is stopped by
|
||||||
* throwing a {@link TimeExceededException}.
|
* throwing a {@link TimeExceededException}.
|
||||||
*
|
*
|
||||||
|
* @deprecated Use {@link IndexSearcher#setTimeout(QueryTimeout)} to time out queries.
|
||||||
* @see org.apache.lucene.index.ExitableDirectoryReader
|
* @see org.apache.lucene.index.ExitableDirectoryReader
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TimeLimitingCollector implements Collector {
|
public class TimeLimitingCollector implements Collector {
|
||||||
|
|
||||||
/** Thrown when elapsed search time exceeds allowed search time. */
|
/** Thrown when elapsed search time exceeds allowed search time. */
|
||||||
|
|
Loading…
Reference in New Issue