Skip to content

Commit 9b088db

Browse files
committed
adapt to Lucene 9.x
1 parent 4524012 commit 9b088db

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ private void setupDeletedUids() throws IOException {
784784
indexDirectory);
785785
for (int i = 0; i < reader.maxDoc(); i++) {
786786
if (!liveDocs.get(i)) {
787-
Document doc = reader.document(i, LIVE_CHECK_FIELDS); // use limited-field version
787+
StoredFields storedFields = reader.storedFields();
788+
Document doc = storedFields.document(i, LIVE_CHECK_FIELDS); // use limited-field version
788789
IndexableField field = doc.getField(QueryBuilder.U);
789790
if (field != null) {
790791
if (LOGGER.isLoggable(Level.FINEST)) {

opengrok-indexer/src/test/java/org/opengrok/indexer/index/IndexerVsDeletedDocumentsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private Set<String> getDeletedUids(String projectName) throws IOException {
219219
}
220220

221221
for (int i = 0; i < indexReader.maxDoc(); i++) {
222-
Document doc = indexReader.document(i);
222+
Document doc = indexReader.storedFields().document(i);
223223
// This should avoid the special LOC documents.
224224
IndexableField field = doc.getField(QueryBuilder.U);
225225
if (field != null) {

0 commit comments

Comments
 (0)