mirror of
https://github.com/apache/nifi.git
synced 2025-02-06 18:18:27 +00:00
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) {
|
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 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);
|
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);
|
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());
|
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);
|
return new Tuple<>(events, totalHits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class TestSimpleIndexManager {
|
|||||||
|
|
||||||
final EventIndexSearcher searcher = mgr.borrowIndexSearcher(dir);
|
final EventIndexSearcher searcher = mgr.borrowIndexSearcher(dir);
|
||||||
final TopDocs topDocs = searcher.getIndexSearcher().search(new MatchAllDocsQuery(), 2);
|
final TopDocs topDocs = searcher.getIndexSearcher().search(new MatchAllDocsQuery(), 2);
|
||||||
assertEquals(2, topDocs.totalHits.value);
|
assertEquals(2, topDocs.totalHits.value());
|
||||||
mgr.returnIndexSearcher(searcher);
|
mgr.returnIndexSearcher(searcher);
|
||||||
} finally {
|
} finally {
|
||||||
FileUtils.deleteFile(dir, true);
|
FileUtils.deleteFile(dir, true);
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<module>nifi-provenance-repository-nar</module>
|
<module>nifi-provenance-repository-nar</module>
|
||||||
</modules>
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
<lucene.version>9.12.0</lucene.version>
|
<lucene.version>10.0.0</lucene.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user