mirror of https://github.com/apache/nifi.git
NIFI-13898 Upgraded Lucene from 9.12.0 to 10.0.0
This closes #9420 - Adjusted TotalHits.value() references aligning with Lucene 10 changes Signed-off-by: Joseph Witt <joewitt@apache.org>
This commit is contained in:
parent
082b5aefef
commit
1bcc61ebb4
|
@ -179,7 +179,7 @@ public class QueryTask implements Runnable {
|
|||
|
||||
private Tuple<List<ProvenanceEventRecord>, Long> readDocuments(final TopDocs topDocs, final StoredFields storedFields) {
|
||||
// If no topDocs is supplied, just provide a Tuple that has no records and a hit count of 0.
|
||||
if (topDocs == null || topDocs.totalHits.value == 0) {
|
||||
if (topDocs == null || topDocs.totalHits.value() == 0) {
|
||||
return new Tuple<>(Collections.<ProvenanceEventRecord> emptyList(), 0L);
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ public class QueryTask implements Runnable {
|
|||
final long fetchEventNanos = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - endConvert);
|
||||
logger.debug("Fetching {} events from Event Store took {} ms ({} events actually fetched)", eventIds.size(), fetchEventNanos, events.size());
|
||||
|
||||
final long totalHits = topDocs.totalHits.value;
|
||||
final long totalHits = topDocs.totalHits.value();
|
||||
return new Tuple<>(events, totalHits);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public class TestSimpleIndexManager {
|
|||
|
||||
final EventIndexSearcher searcher = mgr.borrowIndexSearcher(dir);
|
||||
final TopDocs topDocs = searcher.getIndexSearcher().search(new MatchAllDocsQuery(), 2);
|
||||
assertEquals(2, topDocs.totalHits.value);
|
||||
assertEquals(2, topDocs.totalHits.value());
|
||||
mgr.returnIndexSearcher(searcher);
|
||||
} finally {
|
||||
FileUtils.deleteFile(dir, true);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<module>nifi-provenance-repository-nar</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<lucene.version>9.12.0</lucene.version>
|
||||
<lucene.version>10.0.0</lucene.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
|
Loading…
Reference in New Issue