Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark TimeLimitingCollector as deprecated #13220

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
* {@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 {

Expand Down
2 changes: 0 additions & 2 deletions lucene/core/src/java/org/apache/lucene/search/Collector.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
* <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 &lt;= 0.0
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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;
Expand All @@ -27,8 +28,10 @@
* 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. */
Expand Down