Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Lucene 10.1.0 #119308

Open
wants to merge 758 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
758 commits
Select commit Hold shift + click to select a range
6afa629
Merge branch 'main' into lucene_snapshot
javanna Oct 2, 2024
e12e962
Fix bad merge
javanna Oct 2, 2024
e18492c
Merge branch 'main' into lucene_snapshot
javanna Oct 2, 2024
1a4387d
minor changes to changelog for persian analyzer
javanna Oct 2, 2024
ae92b29
[Automated] Update Lucene snapshot to 10.0.0-snapshot-f76fdb293e1
elasticsearchmachine Oct 3, 2024
de506f7
Merge remote-tracking branch 'origin/main' into lucene_snapshot
pmpailis Oct 3, 2024
d92bfad
Merge branch 'main' into lucene_snapshot
javanna Oct 3, 2024
aeabb36
[Automated] Update Lucene snapshot to 10.0.0-snapshot-f76fdb293e1
elasticsearchmachine Oct 4, 2024
e56d356
muting RankDocsQueryBuilderTests testRankDocsQueryEarlyTerminate
pmpailis Oct 4, 2024
f5602af
Merge branch 'main' into lucene_snapshot
cbuescher Oct 4, 2024
ca1938c
Fix compilation issue
cbuescher Oct 4, 2024
e4de0a1
Add changelog about the nori dictionary update (#114124)
cbuescher Oct 4, 2024
6861f7f
fix typos
javanna Oct 4, 2024
add9a9e
Updating RankDocRetrieverBuilderIT for lucene_snapshot branch (#114098)
pmpailis Oct 4, 2024
dba248e
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 4, 2024
adfd377
Add Snowball upgrade changelog (#114146)
cbuescher Oct 4, 2024
1df381a
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 5, 2024
e3e795e
Merge branch 'main' into lucene_snapshot
ChrisHegarty Oct 5, 2024
4d4e435
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 6, 2024
174df87
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 6, 2024
d0951f6
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 7, 2024
64e66e8
muting RankDocsQueryBuilderTests testRankDocsQueryEarlyTerminate (#11…
pmpailis Oct 7, 2024
8edbe11
Merge branch 'main' into lucene_snapshot
cbuescher Oct 7, 2024
a2a7120
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 7, 2024
e7a8877
Delete full cluster restart test removed in main
javanna Oct 7, 2024
6799147
Remove smoke test section in MetadataCreateIndexServiceTests
cbuescher Oct 7, 2024
cd46af1
spotless
javanna Oct 7, 2024
0ee0940
Merge branch 'main' into lucene_snapshot
javanna Oct 7, 2024
f8fac7a
Address EngineTestCase compile errors
javanna Oct 7, 2024
7987e8c
Address more compile errors around TotalHitCountCollectorManager cons…
javanna Oct 7, 2024
43b9797
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 8, 2024
cb0a0f0
Merge branch 'main' into lucene_snapshot
javanna Oct 8, 2024
37e47c5
Merge branch 'main' into lucene_snapshot
cbuescher Oct 8, 2024
a413196
Merge branch 'main' into lucene_snapshot
javanna Oct 8, 2024
c12a689
Merge remote-tracking branch 'upstream/main' into lucene_snapshot
benwtrent Oct 8, 2024
84fdf5a
[Automated] Update Lucene snapshot to 10.0.0-snapshot-a4c0f741ccc
elasticsearchmachine Oct 9, 2024
70ce7a1
Merge branch 'main' into lucene_snapshot
cbuescher Oct 9, 2024
fc31076
Fix bbq for Lucene 10
benwtrent Oct 8, 2024
3933d6a
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 9, 2024
7dafac9
[Automated] Update Lucene snapshot to 10.0.0-snapshot-bc478d85a12
elasticsearchmachine Oct 9, 2024
8835728
apply MADV_NORMAL advice to enable more aggressive readahead (#114410)
ChrisHegarty Oct 9, 2024
773de7d
Merge branch 'main' into lucene_snapshot
cbuescher Oct 9, 2024
ec1b110
[Automated] Update Lucene snapshot to 10.0.0-snapshot-eadc07cc6a1
elasticsearchmachine Oct 10, 2024
08a24ca
Merge branch 'main' into lucene_snapshot
cbuescher Oct 10, 2024
3d77894
Remove empty queue conditional from slicing logic (#114513)
javanna Oct 10, 2024
7731f08
Merge branch 'main' into lucene_snapshot
cbuescher Oct 10, 2024
34ed721
[Automated] Update Lucene snapshot to 10.0.0-snapshot-eadc07cc6a1
elasticsearchmachine Oct 11, 2024
edb88a0
Merge branch 'main' into lucene_snapshot
cbuescher Oct 11, 2024
e5f7124
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 11, 2024
b02af0f
Merge branch 'lucene_snapshot' of github.com:elastic/elasticsearch in…
benwtrent Oct 11, 2024
9018a73
Merge branch 'main' into lucene_snapshot
cbuescher Oct 11, 2024
4721a67
[Automated] Update Lucene snapshot to 10.0.0-snapshot-eadc07cc6a1
elasticsearchmachine Oct 12, 2024
c2a480b
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 12, 2024
3c5086a
[Automated] Update Lucene snapshot to 10.0.0-snapshot-eadc07cc6a1
elasticsearchmachine Oct 13, 2024
c70ceb7
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 13, 2024
8574e51
[Automated] Update Lucene snapshot to 10.0.0-snapshot-eadc07cc6a1
elasticsearchmachine Oct 14, 2024
073a116
Merge branch 'main' into lucene_snapshot
cbuescher Oct 14, 2024
31b41d3
Merge branch 'main' into lucene_snapshot
javanna Oct 14, 2024
604ecac
[Automated] Update Lucene snapshot to 10.0.1-snapshot-e821a1b4f87
elasticsearchmachine Oct 15, 2024
98614eb
Merge branch 'main' into lucene_snapshot
cbuescher Oct 15, 2024
1229f7e
Put some duct tape on ES816BinaryFlatVectorsScorer compilation errors
cbuescher Oct 15, 2024
2c60a44
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 15, 2024
feda8ea
Merge branch 'lucene_snapshot' of github.com:elastic/elasticsearch in…
benwtrent Oct 15, 2024
fb79083
Add new Index version for 10.0.1
ChrisHegarty Oct 15, 2024
8158cf8
Merge branch 'lucene_snapshot' of github.com:elastic/elasticsearch in…
benwtrent Oct 15, 2024
5d7c464
Correcting BinarizedByteVectorValues & OffHeapBinarizedVectorValues m…
benwtrent Oct 15, 2024
44614d3
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 16, 2024
8f59f67
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 16, 2024
15314d0
Merge branch 'main' into lucene_snapshot
javanna Oct 16, 2024
35f366b
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 17, 2024
07e4e89
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 17, 2024
a34cbb7
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 18, 2024
4fd18c9
Merge branch 'main' into lucene_snapshot
cbuescher Oct 18, 2024
5225f96
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 18, 2024
37abd51
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 19, 2024
eb3a287
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 20, 2024
468ba68
Merge branch 'main' into lucene_snapshot
javanna Oct 20, 2024
2ff3cb0
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 21, 2024
49646ec
Merge branch 'main' into lucene_snapshot
cbuescher Oct 21, 2024
6aaecaa
Merge branch 'main' into lucene_snapshot
cbuescher Oct 21, 2024
17c11ec
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 22, 2024
e70267a
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 22, 2024
cfa3cda
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 23, 2024
8cf1bf9
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 23, 2024
3b8073f
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 24, 2024
7a75e52
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 24, 2024
30b2a02
[Automated] Update Lucene snapshot to 10.0.1-snapshot-5851033047d
elasticsearchmachine Oct 25, 2024
cde5272
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 25, 2024
745acf9
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 26, 2024
e225ffd
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 26, 2024
2641103
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 27, 2024
9ae4936
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 27, 2024
7478842
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 28, 2024
d4a0b7d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 28, 2024
470da3f
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 29, 2024
6a757e9
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 29, 2024
e36abfb
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 30, 2024
d0a05da
Merge branch 'main' into lucene_snapshot
cbuescher Oct 30, 2024
669e006
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Oct 31, 2024
d00fdf2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Oct 31, 2024
8b40c4f
Merge branch 'main' into lucene_snapshot
cbuescher Oct 31, 2024
67994f6
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Nov 1, 2024
40d0b72
Fix wrong IndexVersion order of 10_0_1 update
cbuescher Nov 1, 2024
1d38a6a
Merge branch 'main' into lucene_snapshot
cbuescher Nov 1, 2024
41cfb9f
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 1, 2024
4227e24
Merge branch 'main' into lucene_snapshot
cbuescher Nov 1, 2024
68e980c
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Nov 2, 2024
15c0dab
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 2, 2024
e4b626b
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Nov 3, 2024
ab39b53
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 3, 2024
407bdbc
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Nov 4, 2024
42ec3e7
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 4, 2024
da85260
[Automated] Update Lucene snapshot to 10.0.1-snapshot-7a0365d4d39
elasticsearchmachine Nov 5, 2024
aa1754d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 5, 2024
3eabb59
Move the lucene_snapshot branch to target branch_10x (#116242)
javanna Nov 5, 2024
2dc7027
[Automated] Update Lucene snapshot to 10.1.0-snapshot-9a14d573c81
elasticsearchmachine Nov 6, 2024
69a61bd
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 6, 2024
cdac47b
Adjust compile errors due to CompoundFormat#getCompoundReader changes
javanna Nov 6, 2024
5c618ee
Adapt to removal of LeafSimScorer
javanna Nov 6, 2024
93b6678
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6e78f379d92
elasticsearchmachine Nov 7, 2024
9123cfb
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 7, 2024
f4f5073
Merge branch 'main' into lucene_snapshot
javanna Nov 7, 2024
2541930
Adjust FieldUsageStatsIT following removal of LeafSimScorer
javanna Nov 7, 2024
ccb407a
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6e78f379d92
elasticsearchmachine Nov 8, 2024
43d280e
Merge branch 'main' into lucene_snapshot
javanna Nov 8, 2024
ca91219
Bump Elasticsearch codec to track Lucene101Codec (#116318)
javanna Nov 8, 2024
c5c9d43
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6e78f379d92
elasticsearchmachine Nov 9, 2024
a45e49b
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 9, 2024
b611f6d
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6e78f379d92
elasticsearchmachine Nov 10, 2024
b305e4e
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6e78f379d92
elasticsearchmachine Nov 11, 2024
89f3497
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 11, 2024
4f118fb
[Automated] Update Lucene snapshot to 10.1.0-snapshot-ae92ce34c01
elasticsearchmachine Nov 12, 2024
131d314
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 12, 2024
a07d54e
[Automated] Update Lucene snapshot to 10.1.0-snapshot-ffc94df1c2d
elasticsearchmachine Nov 13, 2024
fff64f5
[Automated] Update Lucene snapshot to 10.1.0-snapshot-ffc94df1c2d
elasticsearchmachine Nov 14, 2024
17688ac
[Automated] Update Lucene snapshot to 10.1.0-snapshot-98918aa223e
elasticsearchmachine Nov 15, 2024
2320348
[Automated] Update Lucene snapshot to 10.1.0-snapshot-a5d44d89eb1
elasticsearchmachine Nov 16, 2024
d63f8f6
[Automated] Update Lucene snapshot to 10.1.0-snapshot-a5d44d89eb1
elasticsearchmachine Nov 17, 2024
f653876
[Automated] Update Lucene snapshot to 10.1.0-snapshot-a5d44d89eb1
elasticsearchmachine Nov 18, 2024
f644c6d
[Automated] Update Lucene snapshot to 10.1.0-snapshot-c96ec0be678
elasticsearchmachine Nov 19, 2024
b0f8418
[Automated] Update Lucene snapshot to 10.1.0-snapshot-a67120e1754
elasticsearchmachine Nov 20, 2024
5934b28
[Automated] Update Lucene snapshot to 10.1.0-snapshot-b70d214217a
elasticsearchmachine Nov 21, 2024
fe2c985
[Automated] Update Lucene snapshot to 10.1.0-snapshot-816b5fa3c3b
elasticsearchmachine Nov 22, 2024
adc73ac
[Automated] Update Lucene snapshot to 10.1.0-snapshot-cbec73e4c32
elasticsearchmachine Nov 23, 2024
357c261
[Automated] Update Lucene snapshot to 10.1.0-snapshot-4f682ae6afc
elasticsearchmachine Nov 24, 2024
bab0bda
[Automated] Update Lucene snapshot to 10.1.0-snapshot-4f682ae6afc
elasticsearchmachine Nov 25, 2024
08e6a2d
Merge branch 'main' into lucene_snapshot
ChrisHegarty Nov 25, 2024
73d6bc3
lucene_snapshot: spotless
ChrisHegarty Nov 25, 2024
510800e
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 25, 2024
00cb9a0
Remove deprecated source mode from DocumentParserContextTests
ChrisHegarty Nov 25, 2024
3cdd181
Update SyntheticSourceIndexSettingsProviderTests to expect source mod…
ChrisHegarty Nov 25, 2024
f352daa
[Automated] Update Lucene snapshot to 10.1.0-snapshot-71715b59e8a
elasticsearchmachine Nov 26, 2024
8ebb3e2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 26, 2024
a4237d9
[Automated] Update Lucene snapshot to 10.1.0-snapshot-71715b59e8a
elasticsearchmachine Nov 27, 2024
0ab66d2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 27, 2024
256d9d7
[Automated] Update Lucene snapshot to 10.1.0-snapshot-c529c49c3e5
elasticsearchmachine Nov 28, 2024
55369be
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Nov 28, 2024
c7f0962
[Automated] Update Lucene snapshot to 10.1.0-snapshot-c529c49c3e5
elasticsearchmachine Nov 29, 2024
7afea11
[Automated] Update Lucene snapshot to 10.1.0-snapshot-b732543b575
elasticsearchmachine Nov 30, 2024
a7e4218
[Automated] Update Lucene snapshot to 10.1.0-snapshot-b732543b575
elasticsearchmachine Dec 1, 2024
db2a9ed
[Automated] Update Lucene snapshot to 10.1.0-snapshot-b732543b575
elasticsearchmachine Dec 2, 2024
6a9c5a3
Merge branch 'main' into lucene_snapshot
ChrisHegarty Dec 2, 2024
cdb9528
lucene_shapshot: Update DisiWrapper construction after apache/14023
ChrisHegarty Dec 2, 2024
af39730
[Automated] Update Lucene snapshot to 10.1.0-snapshot-8762de7f114
elasticsearchmachine Dec 3, 2024
bb94373
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 3, 2024
e7ddc74
[Automated] Update Lucene snapshot to 10.1.0-snapshot-c9c631f9d29
elasticsearchmachine Dec 4, 2024
b0cdbe0
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 4, 2024
58c6a31
[Automated] Update Lucene snapshot to 10.1.0-snapshot-895177861f3
elasticsearchmachine Dec 5, 2024
38dd10b
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 5, 2024
ff0fff4
[Automated] Update Lucene snapshot to 10.1.0-snapshot-895177861f3
elasticsearchmachine Dec 6, 2024
a707615
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 6, 2024
a104662
Fix completion postings format name
javanna Dec 6, 2024
992b3c8
[Automated] Update Lucene snapshot to 10.1.0-snapshot-d2c2a44c583
elasticsearchmachine Dec 7, 2024
aa1228d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 7, 2024
d1387ff
[Automated] Update Lucene snapshot to 10.1.0-snapshot-d2c2a44c583
elasticsearchmachine Dec 8, 2024
783c7c8
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 8, 2024
30d8270
[Automated] Update Lucene snapshot to 10.1.0-snapshot-d2c2a44c583
elasticsearchmachine Dec 9, 2024
678dad1
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 9, 2024
a22493a
[Automated] Update Lucene snapshot to 10.1.0-snapshot-3aefd605c43
elasticsearchmachine Dec 10, 2024
fb68df9
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 10, 2024
69fc1aa
Fix binary quantized tests compile errors
javanna Dec 10, 2024
9fce7e7
[Automated] Update Lucene snapshot to 10.1.0-snapshot-4cdb67329fb
elasticsearchmachine Dec 11, 2024
a97249b
Merge branch 'main' into lucene_snapshot
javanna Dec 11, 2024
7f95ac5
Adjust profile docs
javanna Dec 11, 2024
94e5549
Adjust profile tests
javanna Dec 11, 2024
c713f65
fix yaml compat test transform to address profile failure
javanna Dec 11, 2024
dc96c4b
[Automated] Update Lucene snapshot to 10.1.0-snapshot-559c4664eac
elasticsearchmachine Dec 12, 2024
cf0a99d
Remove assertion that always fails on lucene_snapshot
javanna Dec 12, 2024
d85e306
Address testRegexAcceleration failure
javanna Dec 12, 2024
2f89f4a
Merge branch 'main' into lucene_snapshot
javanna Dec 12, 2024
e7b31be
[Automated] Update Lucene snapshot to 10.1.0-snapshot-f8404620878
elasticsearchmachine Dec 13, 2024
26cb419
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 13, 2024
ada1d12
[Automated] Update Lucene snapshot to 10.1.0-snapshot-add9c09c84e
elasticsearchmachine Dec 14, 2024
63d4076
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 14, 2024
def22b7
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d0866a699d6
elasticsearchmachine Dec 15, 2024
b327b1a
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 15, 2024
986664b
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d0866a699d6
elasticsearchmachine Dec 16, 2024
bd5cb15
Revert "[Automated] Update Lucene snapshot to 10.2.0-snapshot-d0866a6…
javanna Dec 16, 2024
c0f8bf9
Revert "[Automated] Update Lucene snapshot to 10.2.0-snapshot-d0866a6…
javanna Dec 16, 2024
8e3e470
Temporarily set lucene_snapshot build branch to branch_10_1
javanna Dec 16, 2024
8d24c29
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6a0531b0f48
elasticsearchmachine Dec 16, 2024
6bc0f85
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 16, 2024
ff667f0
[Automated] Update Lucene snapshot to 10.1.0-snapshot-6a0531b0f48
elasticsearchmachine Dec 17, 2024
fcbfd42
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 17, 2024
bdbb037
[Automated] Update Lucene snapshot to 10.1.0-snapshot-884954006de
elasticsearchmachine Dec 18, 2024
a70bf70
Merge branch 'main' into lucene_snapshot
javanna Dec 18, 2024
5a7edc4
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 18, 2024
d78cce5
[Automated] Update Lucene snapshot to 10.1.0-snapshot-884954006de
elasticsearchmachine Dec 19, 2024
9b566e3
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 19, 2024
28a4667
[Automated] Update Lucene snapshot to 10.1.0-snapshot-884954006de
elasticsearchmachine Dec 20, 2024
09b8860
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 20, 2024
d7be5d3
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 21, 2024
fe97252
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 21, 2024
ba0cb66
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 22, 2024
5abf946
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 22, 2024
4c26b65
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 23, 2024
4c02deb
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 23, 2024
ca51c49
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 24, 2024
d3c95df
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 24, 2024
82430af
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 25, 2024
d35841e
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 25, 2024
b462920
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 26, 2024
dd6b1e2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 26, 2024
5a2f6a9
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 27, 2024
09781b7
Fix versions for Lucene 10.1.0
ChrisHegarty Dec 27, 2024
9327418
Update docs/changelog/119308.yaml
ChrisHegarty Dec 27, 2024
9202d49
Merge remote-tracking branch 'upstream/main' into lucene_snapshot_10_1
ChrisHegarty Dec 27, 2024
8d72916
Update readCommit for N-2
ChrisHegarty Dec 27, 2024
af19725
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 29, 2024
8faa73c
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 30, 2024
580e07b
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 30, 2024
fe517ae
Bump Elasticsearch codec to track Lucene101Codec
ChrisHegarty Dec 30, 2024
9ad8470
clean up
ChrisHegarty Dec 30, 2024
8383529
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 30, 2024
7b90b8f
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 30, 2024
1e77a8a
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 31, 2024
2b6e15d
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 31, 2024
5a68d0e
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Dec 31, 2024
c98ae18
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 1, 2025
8b0af43
use IndexVersions.MINIMUM_READONLY_COMPATIBLE
ChrisHegarty Jan 2, 2025
6ba5bc3
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 2, 2025
4918579
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 2, 2025
8b45ad5
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 2, 2025
9a0b1a5
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 2, 2025
7626552
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 3, 2025
3c7b96b
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 3, 2025
704e367
revert build-snapshot.yml
ChrisHegarty Jan 7, 2025
d3acdf4
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 7, 2025
d276a35
Merge branch 'main' into lucene_snapshot_10_1
ChrisHegarty Jan 20, 2025
67ba016
[CI] Auto commit changes from spotless
elasticsearchmachine Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .buildkite/pipelines/lucene-snapshot/build-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ steps:
- trigger: apache-lucene-build-snapshot
label: Trigger pipeline to build lucene snapshot
key: lucene-build
if: build.env("LUCENE_BUILD_ID") == null || build.env("LUCENE_BUILD_ID") == ""
if: (build.env("LUCENE_BUILD_ID") == null || build.env("LUCENE_BUILD_ID") == "")
build:
branch: branch_10_1
ChrisHegarty marked this conversation as resolved.
Show resolved Hide resolved
- wait
- label: Upload and update lucene snapshot
command: .buildkite/scripts/lucene-snapshot/upload-snapshot.sh
Expand Down
2 changes: 1 addition & 1 deletion build-tools-internal/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elasticsearch = 9.0.0
lucene = 10.0.0
lucene = 10.1.0

bundled_jdk_vendor = openjdk
bundled_jdk = 23+37@3c5b90190c68498b986a97f276efd28a
Expand Down
4 changes: 2 additions & 2 deletions docs/Versions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]

:lucene_version: 10.0.0
:lucene_version_path: 10_0_0
:lucene_version: 10.1.0
:lucene_version_path: 10_1_0
:jdk: 11.0.2
:jdk_major: 11
:build_type: tar
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/119308.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 119308
summary: Upgrade to Lucene 10.1.0
area: Search
type: upgrade
issues: []
12 changes: 6 additions & 6 deletions docs/reference/search/profile.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ The API returns the following result:
"time_in_nanos": 775274,
"children" : [
{
"name": "SimpleTopScoreDocCollector",
"name": "TopScoreDocCollector",
"reason": "search_top_hits",
"time_in_nanos": 775274
}
Expand Down Expand Up @@ -537,7 +537,7 @@ Looking at the previous example:
"time_in_nanos": 775274,
"children" : [
{
"name": "SimpleTopScoreDocCollector",
"name": "TopScoreDocCollector",
"reason": "search_top_hits",
"time_in_nanos": 775274
}
Expand All @@ -551,7 +551,7 @@ Looking at the previous example:


We see a top-level collector named `QueryPhaseCollector` which holds a child
`SimpleTopScoreDocCollector`. `SimpleTopScoreDocCollector` is the default
`TopScoreDocCollector`. `TopScoreDocCollector` is the default
"scoring and sorting" `Collector` used by {es}. The `reason` field attempts
to give a plain English description of the class name. The `time_in_nanos`
is similar to the time in the Query tree: a wall-clock time inclusive of all
Expand Down Expand Up @@ -751,7 +751,7 @@ The API returns the following result:
"time_in_nanos": 1945072,
"children": [
{
"name": "SimpleTopScoreDocCollector",
"name": "TopScoreDocCollector",
"reason": "search_top_hits",
"time_in_nanos": 22577
},
Expand Down Expand Up @@ -788,7 +788,7 @@ major portions of the query are represented:
2. The second `TermQuery` (message:search) represents the `post_filter` query.

The Collector tree is fairly straightforward, showing how a single
QueryPhaseCollector that holds the normal scoring SimpleTopScoreDocCollector
QueryPhaseCollector that holds the normal scoring TopScoreDocCollector
used to collect top hits, as well as BucketCollectorWrapper to run all scoped
aggregations.

Expand Down Expand Up @@ -1332,7 +1332,7 @@ One of the `dfs.knn` sections for a shard looks like the following:
"rewrite_time" : 1275732,
"collector" : [
{
"name" : "SimpleTopScoreDocCollector",
"name" : "TopScoreDocCollector",
"reason" : "search_top_hits",
"time_in_nanos" : 17163
}
Expand Down
200 changes: 125 additions & 75 deletions gradle/verification-metadata.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.index.FieldInvertState;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.NumericDocValues;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermStates;
import org.apache.lucene.index.memory.MemoryIndex;
Expand All @@ -23,7 +24,6 @@
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.LeafSimScorer;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.MatchNoDocsQuery;
import org.apache.lucene.search.Matches;
Expand Down Expand Up @@ -214,7 +214,6 @@ public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float bo
// No need to ever look at the _source for non-scoring term queries
return in.createWeight(searcher, scoreMode, boost);
}

// We use a LinkedHashSet here to preserve the ordering of terms to ensure that
// later summing of float scores per term is consistent
final Set<Term> terms = new LinkedHashSet<>();
Expand Down Expand Up @@ -267,6 +266,7 @@ public boolean isCacheable(LeafReaderContext ctx) {

@Override
public Explanation explain(LeafReaderContext context, int doc) throws IOException {
NumericDocValues norms = context.reader().getNormValues(field);
RuntimePhraseScorer scorer = (RuntimePhraseScorer) scorerSupplier(context).get(0);
if (scorer == null) {
return Explanation.noMatch("No matching phrase");
Expand All @@ -277,8 +277,7 @@ public Explanation explain(LeafReaderContext context, int doc) throws IOExceptio
}
float phraseFreq = scorer.freq();
Explanation freqExplanation = Explanation.match(phraseFreq, "phraseFreq=" + phraseFreq);
final LeafSimScorer leafSimScorer = new LeafSimScorer(simScorer, context.reader(), field, scoreMode.needsScores());
Explanation scoreExplanation = leafSimScorer.explain(doc, freqExplanation);
Explanation scoreExplanation = simScorer.explain(freqExplanation, getNormValue(norms, doc));
return Explanation.match(
scoreExplanation.getValue(),
"weight(" + getQuery() + " in " + doc + ") [" + searcher.getSimilarity().getClass().getSimpleName() + "], result of:",
Expand All @@ -297,9 +296,9 @@ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOExcepti
public Scorer get(long leadCost) throws IOException {
final Scorer approximationScorer = approximationSupplier.get(leadCost);
final DocIdSetIterator approximation = approximationScorer.iterator();
final LeafSimScorer leafSimScorer = new LeafSimScorer(simScorer, context.reader(), field, scoreMode.needsScores());
final CheckedIntFunction<List<Object>, IOException> valueFetcher = valueFetcherProvider.apply(context);
return new RuntimePhraseScorer(approximation, leafSimScorer, valueFetcher, field, in);
NumericDocValues norms = context.reader().getNormValues(field);
return new RuntimePhraseScorer(approximation, simScorer, norms, valueFetcher, field, in);
}

@Override
Expand Down Expand Up @@ -335,12 +334,23 @@ public Matches matches(LeafReaderContext context, int doc) throws IOException {
};
}

private static long getNormValue(NumericDocValues norms, int doc) throws IOException {
if (norms != null) {
boolean found = norms.advanceExact(doc);
assert found;
return norms.longValue();
} else {
return 1L; // default norm
}
}
ChrisHegarty marked this conversation as resolved.
Show resolved Hide resolved

private class RuntimePhraseScorer extends Scorer {
private final LeafSimScorer scorer;
private final SimScorer scorer;
private final CheckedIntFunction<List<Object>, IOException> valueFetcher;
private final String field;
private final Query query;
private final TwoPhaseIterator twoPhase;
private final NumericDocValues norms;

private final MemoryIndexEntry cacheEntry = new MemoryIndexEntry();

Expand All @@ -349,12 +359,14 @@ private class RuntimePhraseScorer extends Scorer {

private RuntimePhraseScorer(
DocIdSetIterator approximation,
LeafSimScorer scorer,
SimScorer scorer,
NumericDocValues norms,
CheckedIntFunction<List<Object>, IOException> valueFetcher,
String field,
Query query
) {
this.scorer = scorer;
this.norms = norms;
this.valueFetcher = valueFetcher;
this.field = field;
this.query = query;
Expand Down Expand Up @@ -386,12 +398,12 @@ public TwoPhaseIterator twoPhaseIterator() {

@Override
public float getMaxScore(int upTo) throws IOException {
return scorer.getSimScorer().score(Float.MAX_VALUE, 1L);
return scorer.score(Float.MAX_VALUE, 1L);
}

@Override
public float score() throws IOException {
return scorer.score(docID(), freq());
return scorer.score(freq(), getNormValue(norms, doc));
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions rest-api-spec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ tasks.named("precommit").configure {
tasks.named("yamlRestCompatTestTransform").configure ({ task ->
task.replaceValueInMatch("profile.shards.0.dfs.knn.0.query.0.description", "DocAndScoreQuery[0,...][0.009673266,...],0.009673266", "dfs knn vector profiling")
task.replaceValueInMatch("profile.shards.0.dfs.knn.0.query.0.description", "DocAndScoreQuery[0,...][0.009673266,...],0.009673266", "dfs knn vector profiling with vector_operations_count")
task.replaceValueInMatch("profile.shards.0.dfs.knn.0.collector.0.name", "TopScoreDocCollector", "dfs knn vector profiling")
task.replaceValueInMatch("profile.shards.0.dfs.knn.0.collector.0.name", "TopScoreDocCollector", "dfs knn vector profiling with vector_operations_count")
task.skipTest("cat.aliases/10_basic/Deprecated local parameter", "CAT APIs not covered by compatibility policy")
task.skipTest("cat.shards/10_basic/Help", "sync_id is removed in 9.0")
task.skipTest("tsdb/20_mapping/exact match object type", "skip until pr/116687 gets backported")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ dfs knn vector profiling:
- gt: { profile.shards.0.dfs.knn.0.query.0.breakdown.create_weight: 0 }
- gt: { profile.shards.0.dfs.knn.0.query.0.breakdown.create_weight_count: 0 }
- gt: { profile.shards.0.dfs.knn.0.rewrite_time: 0 }
- match: { profile.shards.0.dfs.knn.0.collector.0.name: "SimpleTopScoreDocCollector" }
- match: { profile.shards.0.dfs.knn.0.collector.0.reason: "search_top_hits" }
- gt: { profile.shards.0.dfs.knn.0.collector.0.time_in_nanos: 0 }

Expand Down Expand Up @@ -275,6 +274,47 @@ dfs knn vector profiling description:
- match: { hits.total.value: 1 }
- match: { profile.shards.0.dfs.knn.0.query.0.description: "DocAndScoreQuery[0,...][0.009673266,...],0.009673266" }

---
dfs knn vector profiling collector name:
- requires:
cluster_features: "lucene_10_1_upgrade"
reason: collector name changed with lucene 10.1

- do:
indices.create:
index: images
body:
settings:
index.number_of_shards: 1
mappings:
properties:
image:
type: "dense_vector"
dims: 3
index: true
similarity: "l2_norm"

- do:
index:
index: images
id: "1"
refresh: true
body:
image: [1, 5, -20]

- do:
search:
index: images
body:
profile: true
knn:
field: "image"
query_vector: [-5, 9, -12]
k: 1
num_candidates: 100

- match: { profile.shards.0.dfs.knn.0.collector.0.name: "TopScoreDocCollector" }

---
dfs knn vector profiling with vector_operations_count:
- requires:
Expand Down Expand Up @@ -335,7 +375,6 @@ dfs knn vector profiling with vector_operations_count:
- gt: { profile.shards.0.dfs.knn.0.query.0.breakdown.create_weight: 0 }
- gt: { profile.shards.0.dfs.knn.0.query.0.breakdown.create_weight_count: 0 }
- gt: { profile.shards.0.dfs.knn.0.rewrite_time: 0 }
- match: { profile.shards.0.dfs.knn.0.collector.0.name: "SimpleTopScoreDocCollector" }
- match: { profile.shards.0.dfs.knn.0.collector.0.reason: "search_top_hits" }
- gt: { profile.shards.0.dfs.knn.0.collector.0.time_in_nanos: 0 }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void testFieldUsageStats() throws ExecutionException, InterruptedExceptio
assertTrue(stats.hasField("field2"));
// positions because of span query
assertEquals(
Set.of(UsageContext.TERMS, UsageContext.POSTINGS, UsageContext.FREQS, UsageContext.POSITIONS),
Set.of(UsageContext.TERMS, UsageContext.POSTINGS, UsageContext.FREQS, UsageContext.POSITIONS, UsageContext.NORMS),
stats.get("field2").keySet()
);
assertEquals(1L * numShards, stats.get("field2").getTerms());
Expand Down
3 changes: 2 additions & 1 deletion server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@
with
org.elasticsearch.index.codec.Elasticsearch814Codec,
org.elasticsearch.index.codec.Elasticsearch816Codec,
org.elasticsearch.index.codec.Elasticsearch900Codec;
org.elasticsearch.index.codec.Elasticsearch900Codec,
org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec;

provides org.apache.logging.log4j.core.util.ContextDataProvider with org.elasticsearch.common.logging.DynamicContextDataProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.apache.lucene.backward_codecs.lucene50.Lucene50PostingsFormat;
import org.apache.lucene.backward_codecs.lucene84.Lucene84PostingsFormat;
import org.apache.lucene.backward_codecs.lucene90.Lucene90PostingsFormat;
import org.apache.lucene.backward_codecs.lucene912.Lucene912PostingsFormat;
import org.apache.lucene.backward_codecs.lucene99.Lucene99PostingsFormat;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.FieldsProducer;
Expand All @@ -21,7 +22,7 @@
import org.apache.lucene.codecs.PointsReader;
import org.apache.lucene.codecs.StoredFieldsReader;
import org.apache.lucene.codecs.TermVectorsReader;
import org.apache.lucene.codecs.lucene912.Lucene912PostingsFormat;
import org.apache.lucene.codecs.lucene101.Lucene101PostingsFormat;
import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.index.ByteVectorValues;
import org.apache.lucene.index.DirectoryReader;
Expand Down Expand Up @@ -306,6 +307,9 @@ private static void readProximity(Terms terms, PostingsEnum postings) throws IOE
private static BlockTermState getBlockTermState(TermsEnum termsEnum, BytesRef term) throws IOException {
if (term != null && termsEnum.seekExact(term)) {
final TermState termState = termsEnum.termState();
if (termState instanceof final Lucene101PostingsFormat.IntBlockTermState blockTermState) {
return new BlockTermState(blockTermState.docStartFP, blockTermState.posStartFP, blockTermState.payStartFP);
}
if (termState instanceof final Lucene912PostingsFormat.IntBlockTermState blockTermState) {
return new BlockTermState(blockTermState.docStartFP, blockTermState.posStartFP, blockTermState.payStartFP);
}
Expand Down
26 changes: 3 additions & 23 deletions server/src/main/java/org/elasticsearch/common/lucene/Lucene.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import org.elasticsearch.common.util.iterable.Iterables;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexVersions;
import org.elasticsearch.index.analysis.AnalyzerScope;
import org.elasticsearch.index.analysis.NamedAnalyzer;
Expand All @@ -89,10 +88,9 @@
import java.util.Map;
import java.util.Objects;

import static org.apache.lucene.util.Version.LUCENE_10_0_0;

public class Lucene {
public static final String LATEST_CODEC = "Lucene100";

public static final String LATEST_CODEC = "Lucene101";

public static final String SOFT_DELETES_FIELD = "__soft_deletes";

Expand Down Expand Up @@ -156,25 +154,7 @@ public static SegmentInfos readSegmentInfos(IndexCommit commit) throws IOExcepti
* Reads the segments infos from the given segments file name, failing if it fails to load
*/
private static SegmentInfos readSegmentInfos(String segmentsFileName, Directory directory) throws IOException {
// TODO Use readCommit(Directory directory, String segmentFileName, int minSupportedMajorVersion) once Lucene 10.1 is available
// and remove the try-catch block for IndexFormatTooOldException
assert IndexVersion.current().luceneVersion().equals(LUCENE_10_0_0) : "remove the try-catch block below";
try {
return SegmentInfos.readCommit(directory, segmentsFileName);
} catch (IndexFormatTooOldException e) {
try {
// Temporary workaround until Lucene 10.1 is available: try to leverage min. read-only compatibility to read the last commit
// and then check if this is the commit we want. This should always work for the case we are interested in (archive and
// searchable snapshots indices in N-2 version) as no newer commit should be ever written.
var segmentInfos = readSegmentInfos(directory);
if (segmentsFileName.equals(segmentInfos.getSegmentsFileName())) {
return segmentInfos;
}
} catch (Exception suppressed) {
e.addSuppressed(suppressed);
}
throw e;
}
return SegmentInfos.readCommit(directory, segmentsFileName, IndexVersions.MINIMUM_READONLY_COMPATIBLE.luceneVersion().major);
ChrisHegarty marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private static Version parseUnchecked(String version) {
public static final IndexVersion DEPRECATE_SOURCE_MODE_MAPPER = def(9_003_00_0, Version.LUCENE_10_0_0);
public static final IndexVersion USE_SYNTHETIC_SOURCE_FOR_RECOVERY = def(9_004_00_0, Version.LUCENE_10_0_0);
public static final IndexVersion INFERENCE_METADATA_FIELDS = def(9_005_00_0, Version.LUCENE_10_0_0);
public static final IndexVersion UPGRADE_TO_LUCENE_10_1_0 = def(9_006_00_0, Version.LUCENE_10_1_0);

/*
* STOP! READ THIS FIRST! No, really,
Expand Down
Loading
Loading