Remove deprecated IndexSearcher#getExecutor method (#12580)

Use getTaskExecutor instead. This is important to enforce tracking of
tasks that run in each thread.

Relates to #12578
This commit is contained in:
Luca Cavanna 2023-09-21 12:30:32 +02:00 committed by GitHub
parent e43bea4fa4
commit 3deead0ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -57,6 +57,9 @@ API Changes
* GITHUB#12407: Removed Scorable#docID. (Adrien Grand) * GITHUB#12407: Removed Scorable#docID. (Adrien Grand)
* GITHUB#12580: Remove deprecated IndexSearcher#getExecutor in favour of executing concurrent tasks using
the TaskExecutor that the searcher holds, retrieved via IndexSearcher#getTaskExecutor (Luca Cavanna)
New Features New Features
--------------------- ---------------------
@ -131,6 +134,8 @@ Other
API Changes API Changes
--------------------- ---------------------
* GITHUB#12578: Deprecate IndexSearcher#getExecutor in favour of executing concurrent tasks using
the TaskExecutor that the searcher holds, retrieved via IndexSearcher#getTaskExecutor (Luca Cavanna)
New Features New Features
--------------------- ---------------------

View File

@ -95,6 +95,11 @@ Callers should remove the parameter when calling this method.
The former `DaciukMihovAutomatonBuilder#build` functionality is exposed through `Automata#makeStringUnion`. The former `DaciukMihovAutomatonBuilder#build` functionality is exposed through `Automata#makeStringUnion`.
Users should be able to directly migrate to the `Automata` static method as a 1:1 replacement. Users should be able to directly migrate to the `Automata` static method as a 1:1 replacement.
### Remove deprecated IndexSearcher#getExecutor (GITHUB#12580)
The deprecated getter for the `Executor` that was optionally provided to the `IndexSearcher` constructors
has been removed. Users that want to execute concurrent tasks should rely instead on the `TaskExecutor`
that the searcher holds, retrieved via `IndexSearcher#getTaskExecutor`.
## Migration from Lucene 9.0 to Lucene 9.1 ## Migration from Lucene 9.0 to Lucene 9.1

View File

@ -946,11 +946,6 @@ public class IndexSearcher {
return new CollectionStatistics(field, reader.maxDoc(), docCount, sumTotalTermFreq, sumDocFreq); return new CollectionStatistics(field, reader.maxDoc(), docCount, sumTotalTermFreq, sumDocFreq);
} }
/** Returns this searchers executor or <code>null</code> if no executor was provided */
public Executor getExecutor() {
return executor;
}
/** /**
* Returns the {@link TaskExecutor} that this searcher relies on to execute concurrent operations * Returns the {@link TaskExecutor} that this searcher relies on to execute concurrent operations
* *