Bump Lucene version to 6.6.5
We cannot skip major Lucene version and upgrade directly from 5 to 7, because backwards codec compatibility layer only supports one major release. To support online reindexing we have to do the upgrade to Lucene 7 in two steps and wait for one gerrit release between the Lucene version upgrades. There are some removal and deprecation compared to current 5.5 version: * IntField, LongField are deprecated and supposed to be replaced with IntPoint and LongPoint. We use the deprecated Legacy<Foo> field types. These types were moved to Solr distribution and could be used even in the next major version 7. * TrackingIndexWriter functionality has been folded into IndexWriter in 6.2. Its APIs now return a long sequence number which can be passed to ControlledRealTimeReopenThread directly without TrackingIndexWriter acting as a mediator. Feature: Issue 7856 Change-Id: I25e8454e2b541eb5d8aac1e98d011c65b5e12240
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
package com.google.gerrit.server.documentation;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
@@ -85,9 +85,9 @@ public class QueryDocumentationExecutor {
|
||||
// and skipped paging. Maybe add paging later.
|
||||
TopDocs results = searcher.search(query, Integer.MAX_VALUE);
|
||||
ScoreDoc[] hits = results.scoreDocs;
|
||||
int totalHits = results.totalHits;
|
||||
long totalHits = results.totalHits;
|
||||
|
||||
List<DocResult> out = Lists.newArrayListWithCapacity(totalHits);
|
||||
List<DocResult> out = new ArrayList<>();
|
||||
for (int i = 0; i < totalHits; i++) {
|
||||
DocResult result = new DocResult();
|
||||
Document doc = searcher.doc(hits[i].doc);
|
||||
|
||||
Reference in New Issue
Block a user