Skip to content

Upgrade to Lucene 10.2.0 #126594

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

Merged
merged 924 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
924 commits
Select commit Hold shift + click to select a range
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
86b078e
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 27, 2024
f23c539
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 28, 2024
849135f
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 28, 2024
d9433cc
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 29, 2024
5fbfc9d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 29, 2024
b231bb6
[Automated] Update Lucene snapshot to 10.1.1-snapshot-7415d5a7e87
elasticsearchmachine Dec 30, 2024
e4dd62b
Update readCommit for N-2
ChrisHegarty Dec 27, 2024
452757b
Bump Elasticsearch codec to track Lucene101Codec
ChrisHegarty Dec 30, 2024
277463e
clean up
ChrisHegarty Dec 30, 2024
1b83deb
Merge branch 'main' into lucene_snapshot
ChrisHegarty Dec 30, 2024
483a86e
fix shas
ChrisHegarty Dec 30, 2024
84b29f3
add 10.1.1 index version
ChrisHegarty Dec 30, 2024
72ac540
Revert "fix shas"
ChrisHegarty Dec 30, 2024
12e7f1c
more shas!
ChrisHegarty Dec 30, 2024
153a758
switch back to lucene/branch_10x (tracking 10.2)
ChrisHegarty Dec 30, 2024
e58c2a4
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0db84016bce
elasticsearchmachine Dec 30, 2024
ba9a85a
Add new IndexVersion for 10.2.0
ChrisHegarty Dec 30, 2024
5d8a8ff
Fix use of DisjunctionDISIApproximation API
ChrisHegarty Dec 30, 2024
fbf9a0f
Fix use of DisjunctionDISIApproximation API
ChrisHegarty Dec 30, 2024
e885d7a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0db84016bce
elasticsearchmachine Dec 31, 2024
0c2fa27
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Dec 31, 2024
e88e3c4
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0bfa27513dc
elasticsearchmachine Jan 1, 2025
0feaa3f
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 1, 2025
2b6b7d6
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0bfa27513dc
elasticsearchmachine Jan 2, 2025
8c24a1d
Fix use of DisjunctionDISIApproximation API
ChrisHegarty Jan 2, 2025
ef33be0
use IndexVersions.MINIMUM_READONLY_COMPATIBLE
ChrisHegarty Jan 2, 2025
0074140
Fix use of DisjunctionDISIApproximation API
ChrisHegarty Jan 2, 2025
28e1e00
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 2, 2025
7624f54
Fix use of DisjunctionDISIApproximation API
ChrisHegarty Jan 2, 2025
720291a
Merge branch 'main' into lucene_snapshot
ChrisHegarty Jan 2, 2025
510b0ed
[Automated] Update Lucene snapshot to 10.2.0-snapshot-6d20ff57932
elasticsearchmachine Jan 3, 2025
15651f4
Remove unnecessary copy of filterWrappers
ChrisHegarty Jan 3, 2025
de150b2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 3, 2025
e101198
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d1d3cde0314
elasticsearchmachine Jan 4, 2025
2fe80b2
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 4, 2025
7608237
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d1d3cde0314
elasticsearchmachine Jan 5, 2025
ae31900
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 5, 2025
5463124
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d1d3cde0314
elasticsearchmachine Jan 6, 2025
6c5848a
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 6, 2025
67189b3
[Automated] Update Lucene snapshot to 10.2.0-snapshot-71460468e0f
elasticsearchmachine Jan 7, 2025
71e09fc
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 7, 2025
8b66f5f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-c795d749e29
elasticsearchmachine Jan 8, 2025
b328f22
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 8, 2025
ce3321a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-cfeba19994e
elasticsearchmachine Jan 9, 2025
6cb7406
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 9, 2025
eeffb43
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b43432cba30
elasticsearchmachine Jan 10, 2025
4cafe6a
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 10, 2025
bb1209b
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b43432cba30
elasticsearchmachine Jan 11, 2025
89040e2
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b43432cba30
elasticsearchmachine Jan 12, 2025
e1ee79d
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b43432cba30
elasticsearchmachine Jan 13, 2025
d20ab0f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b43432cba30
elasticsearchmachine Jan 14, 2025
b280241
[Automated] Update Lucene snapshot to 10.2.0-snapshot-4d26d23f39d
elasticsearchmachine Jan 15, 2025
d082707
[Automated] Update Lucene snapshot to 10.2.0-snapshot-264f75cef13
elasticsearchmachine Jan 16, 2025
767484a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-5e1a08e102c
elasticsearchmachine Jan 17, 2025
03a099e
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f0b7adab21a
elasticsearchmachine Jan 18, 2025
249d5a6
[Automated] Update Lucene snapshot to 10.2.0-snapshot-e0458f8f4c3
elasticsearchmachine Jan 19, 2025
0a75cd8
[Automated] Update Lucene snapshot to 10.2.0-snapshot-e0458f8f4c3
elasticsearchmachine Jan 20, 2025
8ed9a70
[Automated] Update Lucene snapshot to 10.2.0-snapshot-1b494c51c87
elasticsearchmachine Jan 21, 2025
af95c2a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f737c00eab4
elasticsearchmachine Jan 22, 2025
279a236
[Automated] Update Lucene snapshot to 10.2.0-snapshot-fc8b9ff1629
elasticsearchmachine Jan 23, 2025
2d8db84
[Automated] Update Lucene snapshot to 10.2.0-snapshot-4b270750eba
elasticsearchmachine Jan 24, 2025
d1c24de
Merge branch 'main' into lucene_snapshot
javanna Jan 24, 2025
762a4e1
[Automated] Update Lucene snapshot to 10.2.0-snapshot-059d8fe8265
elasticsearchmachine Jan 25, 2025
623eb0a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f973f879ee5
elasticsearchmachine Jan 26, 2025
1b70722
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f973f879ee5
elasticsearchmachine Jan 27, 2025
f5a7192
[Automated] Update Lucene snapshot to 10.2.0-snapshot-ffd7b675604
elasticsearchmachine Jan 28, 2025
5d3aeb4
Merge branch 'main' into lucene_snapshot
ChrisHegarty Jan 28, 2025
5170af6
lucene_snapshot: fix compile issue
ChrisHegarty Jan 28, 2025
2e3a22d
[Automated] Update Lucene snapshot to 10.2.0-snapshot-279502600af
elasticsearchmachine Jan 29, 2025
ee494ba
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Jan 29, 2025
3f8ff89
[Automated] Update Lucene snapshot to 10.2.0-snapshot-63574600f3f
elasticsearchmachine Jan 30, 2025
72f3309
[Automated] Update Lucene snapshot to 10.2.0-snapshot-8b4c500889b
elasticsearchmachine Jan 31, 2025
73c6af0
[Automated] Update Lucene snapshot to 10.2.0-snapshot-8b4c500889b
elasticsearchmachine Feb 1, 2025
2329ff2
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0debeed5cf5
elasticsearchmachine Feb 2, 2025
e685bdc
[Automated] Update Lucene snapshot to 10.2.0-snapshot-9965ec46814
elasticsearchmachine Feb 3, 2025
7bf09a9
[Automated] Update Lucene snapshot to 10.2.0-snapshot-6f5451ca1aa
elasticsearchmachine Feb 4, 2025
37f0d46
[Automated] Update Lucene snapshot to 10.2.0-snapshot-6f5451ca1aa
elasticsearchmachine Feb 5, 2025
d1b4816
[Automated] Update Lucene snapshot to 10.2.0-snapshot-1a676b64f89
elasticsearchmachine Feb 6, 2025
ed2fd66
[Automated] Update Lucene snapshot to 10.2.0-snapshot-eaa79d1d929
elasticsearchmachine Feb 7, 2025
ea869dd
[Automated] Update Lucene snapshot to 10.2.0-snapshot-84891a0af8b
elasticsearchmachine Feb 8, 2025
b9cd09d
[Automated] Update Lucene snapshot to 10.2.0-snapshot-84891a0af8b
elasticsearchmachine Feb 9, 2025
299c965
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f1fb918f72e
elasticsearchmachine Feb 10, 2025
0482095
[Automated] Update Lucene snapshot to 10.2.0-snapshot-5e3fdaf66c4
elasticsearchmachine Feb 11, 2025
305b5cb
[Automated] Update Lucene snapshot to 10.2.0-snapshot-57c30f9b84b
elasticsearchmachine Feb 12, 2025
b9aa3c9
Merge branch 'main' into lucene_snapshot
javanna Feb 12, 2025
7fa01be
spotless
javanna Feb 12, 2025
c6eb74f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-57c30f9b84b
elasticsearchmachine Feb 13, 2025
7a57433
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Feb 13, 2025
d8f39c4
Merge branch 'main' into lucene_snapshot
javanna Feb 13, 2025
bcd3b8e
Merge remote-tracking branch 'upstream/main' into lucene_snapshot
benwtrent Feb 13, 2025
620a45f
Fixing RandomScorerSupplier after lucene change https://github.com/ap…
benwtrent Feb 13, 2025
43b2e87
Fixing compilation after Lucene https://github.com/apache/lucene/pull…
benwtrent Feb 13, 2025
799ca46
[Automated] Update Lucene snapshot to 10.2.0-snapshot-a5bd705c2da
elasticsearchmachine Feb 14, 2025
e77a2d6
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Feb 14, 2025
515bba1
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d9ed87ea099
elasticsearchmachine Feb 15, 2025
7ad643f
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Feb 15, 2025
f6ac877
[Automated] Update Lucene snapshot to 10.2.0-snapshot-24057d851d9
elasticsearchmachine Feb 16, 2025
aeaab48
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Feb 16, 2025
360a8bf
[Automated] Update Lucene snapshot to 10.2.0-snapshot-8ed8524147c
elasticsearchmachine Feb 17, 2025
24dba54
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Feb 17, 2025
84b5b5c
[Automated] Update Lucene snapshot to 10.2.0-snapshot-8ed8524147c
elasticsearchmachine Feb 18, 2025
fe40119
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2dedd1da89a
elasticsearchmachine Feb 19, 2025
05e8f9b
[Automated] Update Lucene snapshot to 10.2.0-snapshot-19abaaa5936
elasticsearchmachine Feb 20, 2025
2acced7
[Automated] Update Lucene snapshot to 10.2.0-snapshot-ebe43d8af5b
elasticsearchmachine Feb 21, 2025
3d836c6
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f2e468b0744
elasticsearchmachine Feb 22, 2025
0f86d0f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f2e468b0744
elasticsearchmachine Feb 23, 2025
d150eab
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b7ac7bcfef7
elasticsearchmachine Feb 24, 2025
b754659
[Automated] Update Lucene snapshot to 10.2.0-snapshot-db775275305
elasticsearchmachine Feb 25, 2025
7d907c2
[Automated] Update Lucene snapshot to 10.2.0-snapshot-d70f4369c07
elasticsearchmachine Feb 26, 2025
8ddac64
[Automated] Update Lucene snapshot to 10.2.0-snapshot-203efff555e
elasticsearchmachine Feb 27, 2025
8e2ce12
[Automated] Update Lucene snapshot to 10.2.0-snapshot-7288f8e7911
elasticsearchmachine Feb 28, 2025
5a34fb2
Fix compilation issues due to lucene update
benwtrent Feb 28, 2025
5d94278
[Automated] Update Lucene snapshot to 10.2.0-snapshot-277d038a244
elasticsearchmachine Mar 1, 2025
df58faa
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b7df84697c9
elasticsearchmachine Mar 3, 2025
375dbd7
[Automated] Update Lucene snapshot to 10.2.0-snapshot-74140e23d80
elasticsearchmachine Mar 4, 2025
4bf39fc
[Automated] Update Lucene snapshot to 10.2.0-snapshot-39e7f0973ec
elasticsearchmachine Mar 5, 2025
a74b273
[Automated] Update Lucene snapshot to 10.2.0-snapshot-39e7f0973ec
elasticsearchmachine Mar 6, 2025
8d40165
[Automated] Update Lucene snapshot to 10.2.0-snapshot-9b48cb1e8d7
elasticsearchmachine Mar 7, 2025
7f7b3dd
[Automated] Update Lucene snapshot to 10.2.0-snapshot-9b48cb1e8d7
elasticsearchmachine Mar 8, 2025
68e312f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-9b48cb1e8d7
elasticsearchmachine Mar 10, 2025
22a99e2
[Automated] Update Lucene snapshot to 10.2.0-snapshot-18458efd88f
elasticsearchmachine Mar 11, 2025
a5baa53
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2159c4027e2
elasticsearchmachine Mar 12, 2025
e82095f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2159c4027e2
elasticsearchmachine Mar 13, 2025
7fa3036
[Automated] Update Lucene snapshot to 10.2.0-snapshot-000afb40cb8
elasticsearchmachine Mar 14, 2025
b0482f2
[Automated] Update Lucene snapshot to 10.2.0-snapshot-235c24215df
elasticsearchmachine Mar 15, 2025
975cd94
[Automated] Update Lucene snapshot to 10.2.0-snapshot-a7a9dec6cd2
elasticsearchmachine Mar 16, 2025
16e2f4c
[Automated] Update Lucene snapshot to 10.2.0-snapshot-53cef55e562
elasticsearchmachine Mar 17, 2025
15e9047
[Automated] Update Lucene snapshot to 10.2.0-snapshot-0e6911da5de
elasticsearchmachine Mar 18, 2025
5076101
[Automated] Update Lucene snapshot to 10.2.0-snapshot-aee95bde218
elasticsearchmachine Mar 19, 2025
2432e86
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f0ee72dedac
elasticsearchmachine Mar 20, 2025
c6ebf3f
Merge branch 'main' into lucene_snapshot
javanna Mar 20, 2025
fd325ac
Fix compile error in IndexDiskUsageAnalyzerTests
javanna Mar 20, 2025
336ca1c
[Automated] Update Lucene snapshot to 10.2.0-snapshot-aa1e9f34b37
elasticsearchmachine Mar 21, 2025
9d9abd8
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 21, 2025
79c3d49
spotless
javanna Mar 21, 2025
d13467a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-12a55dde68c
elasticsearchmachine Mar 22, 2025
60f927d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 22, 2025
66f250f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-12a55dde68c
elasticsearchmachine Mar 23, 2025
697641d
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 23, 2025
8dbe625
[Automated] Update Lucene snapshot to 10.2.0-snapshot-4947373c238
elasticsearchmachine Mar 24, 2025
b989f8e
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 24, 2025
cbe2d76
[Automated] Update Lucene snapshot to 10.2.0-snapshot-baf31488d13
elasticsearchmachine Mar 25, 2025
6c601b8
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 25, 2025
14cc91f
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2071b8fee83
elasticsearchmachine Mar 26, 2025
7320754
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b0c91ec52eb
elasticsearchmachine Mar 27, 2025
e3e5732
merge main
iverase Mar 27, 2025
184ebbd
spotless
iverase Mar 27, 2025
9cea010
[Automated] Update Lucene snapshot to 10.2.0-snapshot-b0c91ec52eb
elasticsearchmachine Mar 28, 2025
67e7ca1
Merge branch 'main' into lucene_snapshot
iverase Mar 28, 2025
5d234c3
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Mar 28, 2025
3998eff
Fix WildcardFieldMapperTests by adding REGEXP_CHAR_CLASS
iverase Mar 28, 2025
6fdb19d
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2772951f5f1
elasticsearchmachine Mar 29, 2025
48f02e0
[Automated] Update Lucene snapshot to 10.2.0-snapshot-2772951f5f1
elasticsearchmachine Mar 30, 2025
7e5b5c9
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f277b5e9198
elasticsearchmachine Mar 31, 2025
1b38d96
[Automated] Update Lucene snapshot to 10.3.0-snapshot-7f4b775d7e4
elasticsearchmachine Apr 1, 2025
2cb084b
switch to lucene/branch_10_2 (tracking 10.2)
iverase Apr 1, 2025
33ee167
[Automated] Update Lucene snapshot to 10.2.0-snapshot-90e60302c4d
elasticsearchmachine Apr 1, 2025
83436de
Use approximation instead of subScores
iverase Apr 1, 2025
5970832
Bump analysis/icu's icu4j dependency to 77.1
iverase Apr 1, 2025
e83bafd
Merge branch 'main' into lucene_snapshot
iverase Apr 1, 2025
597377f
spotless
iverase Apr 1, 2025
83e633e
[Automated] Update Lucene snapshot to 10.2.0-snapshot-90e60302c4d
elasticsearchmachine Apr 2, 2025
2808f1c
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 2, 2025
33b8add
[Automated] Update Lucene snapshot to 10.2.0-snapshot-4984c0c8b5b
elasticsearchmachine Apr 3, 2025
2ab5f8a
[Automated] Update Lucene snapshot to 10.2.0-snapshot-4984c0c8b5b
elasticsearchmachine Apr 3, 2025
76de2b4
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 3, 2025
3b8a4e6
Fixed Character Class and Ranges WildCardQuery Optimizations (#126154)
john-wagster Apr 3, 2025
d2c96d5
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 3, 2025
55ade97
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 4, 2025
f77a617
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 4, 2025
bf9af17
Compare floats with allowable delta diff in VectorScorerFactoryTests …
ChrisHegarty Apr 4, 2025
84c60ef
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 5, 2025
102e507
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 5, 2025
7ff94cc
Merge branch 'main' into lucene_snapshot
iverase Apr 5, 2025
a7c952b
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 6, 2025
9bddb49
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 6, 2025
f5e2154
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 7, 2025
8c19c58
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 7, 2025
d3a4ce4
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 8, 2025
52114d9
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 8, 2025
44505e8
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 9, 2025
a5a133c
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 9, 2025
b457ae8
[Automated] Update Lucene snapshot to 10.2.0-snapshot-f6243360313
elasticsearchmachine Apr 10, 2025
65c27bf
Merge remote-tracking branch 'origin/main' into lucene_snapshot
elasticsearchmachine Apr 10, 2025
98e2628
Upgrade to lucene 10.2.0
iverase Apr 10, 2025
e7e56c3
Update docs/changelog/126594.yaml
iverase Apr 10, 2025
bfecf5e
update build-snapshot.yml
iverase Apr 10, 2025
a78c2e9
Merge branch 'lucene_10_2' of github.com:iverase/elasticsearch into l…
iverase Apr 10, 2025
bf13864
Merge branch 'main' into lucene_10_2
iverase Apr 10, 2025
f5cf211
Merge branch 'main' into lucene_10_2
iverase Apr 14, 2025
ac16ba7
Merge branch 'main' into lucene_10_2
iverase Apr 14, 2025
38e1148
Merge branch 'main' into lucene_10_2
iverase Apr 14, 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.lucene.store.MMapDirectory;
import org.apache.lucene.util.hnsw.RandomVectorScorer;
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
import org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer;
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;
import org.apache.lucene.util.quantization.ScalarQuantizer;
import org.elasticsearch.common.logging.LogConfigurator;
Expand Down Expand Up @@ -76,10 +77,10 @@ public class VectorScorerBenchmark {
float vec2Offset;
float scoreCorrectionConstant;

RandomVectorScorer luceneDotScorer;
RandomVectorScorer luceneSqrScorer;
RandomVectorScorer nativeDotScorer;
RandomVectorScorer nativeSqrScorer;
UpdateableRandomVectorScorer luceneDotScorer;
UpdateableRandomVectorScorer luceneSqrScorer;
UpdateableRandomVectorScorer nativeDotScorer;
UpdateableRandomVectorScorer nativeSqrScorer;

RandomVectorScorer luceneDotScorerQuery;
RandomVectorScorer nativeDotScorerQuery;
Expand Down Expand Up @@ -118,12 +119,16 @@ public void setup() throws IOException {
in = dir.openInput("vector.data", IOContext.DEFAULT);
var values = vectorValues(dims, 2, in, VectorSimilarityFunction.DOT_PRODUCT);
scoreCorrectionConstant = values.getScalarQuantizer().getConstantMultiplier();
luceneDotScorer = luceneScoreSupplier(values, VectorSimilarityFunction.DOT_PRODUCT).scorer(0);
luceneDotScorer = luceneScoreSupplier(values, VectorSimilarityFunction.DOT_PRODUCT).scorer();
luceneDotScorer.setScoringOrdinal(0);
values = vectorValues(dims, 2, in, VectorSimilarityFunction.EUCLIDEAN);
luceneSqrScorer = luceneScoreSupplier(values, VectorSimilarityFunction.EUCLIDEAN).scorer(0);
luceneSqrScorer = luceneScoreSupplier(values, VectorSimilarityFunction.EUCLIDEAN).scorer();
luceneSqrScorer.setScoringOrdinal(0);

nativeDotScorer = factory.getInt7SQVectorScorerSupplier(DOT_PRODUCT, in, values, scoreCorrectionConstant).get().scorer(0);
nativeSqrScorer = factory.getInt7SQVectorScorerSupplier(EUCLIDEAN, in, values, scoreCorrectionConstant).get().scorer(0);
nativeDotScorer = factory.getInt7SQVectorScorerSupplier(DOT_PRODUCT, in, values, scoreCorrectionConstant).get().scorer();
nativeDotScorer.setScoringOrdinal(0);
nativeSqrScorer = factory.getInt7SQVectorScorerSupplier(EUCLIDEAN, in, values, scoreCorrectionConstant).get().scorer();
nativeSqrScorer.setScoringOrdinal(0);

// setup for getInt7SQVectorScorer / query vector scoring
float[] queryVec = new float[dims];
Expand Down
4 changes: 2 additions & 2 deletions build-tools-internal/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elasticsearch = 9.1.0
lucene = 10.1.0
lucene = 10.2.0

bundled_jdk_vendor = openjdk
bundled_jdk = 24+36@1f9ff9062db4449d8ca828c504ffae90
Expand All @@ -8,7 +8,7 @@ spatial4j = 0.7
jts = 1.15.0
jackson = 2.15.0
snakeyaml = 2.0
icu4j = 68.2
icu4j = 77.1
supercsv = 2.4.0
log4j = 2.19.0
slf4j = 2.0.6
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.1.0
:lucene_version_path: 10_1_0
:lucene_version: 10.2.0
:lucene_version_path: 10_2_0
:jdk: 11.0.2
:jdk_major: 11
:build_type: tar
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/126594.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 126594
summary: Upgrade to Lucene 10.2.0
area: Search
type: upgrade
issues: []
215 changes: 80 additions & 135 deletions gradle/verification-metadata.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package org.elasticsearch.simdvec.internal;

import org.apache.lucene.store.MemorySegmentAccessInput;
import org.apache.lucene.util.hnsw.RandomVectorScorer;
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
import org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer;
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;
import org.apache.lucene.util.quantization.ScalarQuantizedVectorSimilarity;

Expand Down Expand Up @@ -55,9 +55,6 @@ protected final void checkOrdinal(int ord) {
}

final float scoreFromOrds(int firstOrd, int secondOrd) throws IOException {
checkOrdinal(firstOrd);
checkOrdinal(secondOrd);

final int length = dims;
long firstByteOffset = (long) firstOrd * (length + Float.BYTES);
long secondByteOffset = (long) secondOrd * (length + Float.BYTES);
Expand Down Expand Up @@ -92,13 +89,21 @@ protected final float fallbackScore(long firstByteOffset, long secondByteOffset)
}

@Override
public RandomVectorScorer scorer(int ord) {
checkOrdinal(ord);
return new RandomVectorScorer.AbstractRandomVectorScorer(values) {
public UpdateableRandomVectorScorer scorer() {
return new UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer(values) {
private int ord = -1;

@Override
public float score(int node) throws IOException {
checkOrdinal(node);
return scoreFromOrds(ord, node);
}

@Override
public void setScoringOrdinal(int node) throws IOException {
checkOrdinal(node);
this.ord = node;
}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.MMapDirectory;
import org.apache.lucene.util.hnsw.RandomVectorScorer;
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
import org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer;
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;
import org.apache.lucene.util.quantization.ScalarQuantizer;

Expand Down Expand Up @@ -50,6 +50,8 @@
// @com.carrotsearch.randomizedtesting.annotations.Repeat(iterations = 100)
public class VectorScorerFactoryTests extends AbstractVectorTestCase {

private static final float DELTA = 1e-4f;

// bounds of the range of values that can be seen by int7 scalar quantized vectors
static final byte MIN_INT7_VALUE = 0;
static final byte MAX_INT7_VALUE = 127;
Expand Down Expand Up @@ -99,10 +101,13 @@ void testSimpleImpl(long maxChunkSize) throws IOException {
float scc = values.getScalarQuantizer().getConstantMultiplier();
float expected = luceneScore(sim, vec1, vec2, scc, vec1Correction, vec2Correction);

var luceneSupplier = luceneScoreSupplier(values, VectorSimilarityType.of(sim)).scorer(0);
var luceneSupplier = luceneScoreSupplier(values, VectorSimilarityType.of(sim)).scorer();
luceneSupplier.setScoringOrdinal(0);
assertThat(luceneSupplier.score(1), equalTo(expected));
var supplier = factory.getInt7SQVectorScorerSupplier(sim, in, values, scc).get();
assertThat(supplier.scorer(0).score(1), equalTo(expected));
var scorer = supplier.scorer();
scorer.setScoringOrdinal(0);
assertThat(scorer.score(1), equalTo(expected));

if (Runtime.version().feature() >= 22) {
var qScorer = factory.getInt7SQVectorScorer(VectorSimilarityType.of(sim), values, query1).get();
Expand Down Expand Up @@ -134,24 +139,32 @@ public void testNonNegativeDotProduct() throws IOException {
float expected = 0f;
assertThat(luceneScore(DOT_PRODUCT, vec1, vec2, 1, -5, -5), equalTo(expected));
var supplier = factory.getInt7SQVectorScorerSupplier(DOT_PRODUCT, in, values, 1).get();
assertThat(supplier.scorer(0).score(1), equalTo(expected));
assertThat(supplier.scorer(0).score(1), greaterThanOrEqualTo(0f));
var scorer = supplier.scorer();
scorer.setScoringOrdinal(0);
assertThat(scorer.score(1), equalTo(expected));
assertThat(scorer.score(1), greaterThanOrEqualTo(0f));
// max inner product
expected = luceneScore(MAXIMUM_INNER_PRODUCT, vec1, vec2, 1, -5, -5);
supplier = factory.getInt7SQVectorScorerSupplier(MAXIMUM_INNER_PRODUCT, in, values, 1).get();
assertThat(supplier.scorer(0).score(1), greaterThanOrEqualTo(0f));
assertThat(supplier.scorer(0).score(1), equalTo(expected));
scorer = supplier.scorer();
scorer.setScoringOrdinal(0);
assertThat(scorer.score(1), greaterThanOrEqualTo(0f));
assertThat(scorer.score(1), equalTo(expected));
// cosine
expected = 0f;
assertThat(luceneScore(COSINE, vec1, vec2, 1, -5, -5), equalTo(expected));
supplier = factory.getInt7SQVectorScorerSupplier(COSINE, in, values, 1).get();
assertThat(supplier.scorer(0).score(1), equalTo(expected));
assertThat(supplier.scorer(0).score(1), greaterThanOrEqualTo(0f));
scorer = supplier.scorer();
scorer.setScoringOrdinal(0);
assertThat(scorer.score(1), equalTo(expected));
assertThat(scorer.score(1), greaterThanOrEqualTo(0f));
// euclidean
expected = luceneScore(EUCLIDEAN, vec1, vec2, 1, -5, -5);
supplier = factory.getInt7SQVectorScorerSupplier(EUCLIDEAN, in, values, 1).get();
assertThat(supplier.scorer(0).score(1), equalTo(expected));
assertThat(supplier.scorer(0).score(1), greaterThanOrEqualTo(0f));
scorer = supplier.scorer();
scorer.setScoringOrdinal(0);
assertThat(scorer.score(1), equalTo(expected));
assertThat(scorer.score(1), greaterThanOrEqualTo(0f));
}
}
}
Expand Down Expand Up @@ -208,7 +221,9 @@ void testRandomSupplier(long maxChunkSize, Function<Integer, byte[]> byteArraySu
var values = vectorValues(dims, size, in, VectorSimilarityType.of(sim));
float expected = luceneScore(sim, vectors[idx0], vectors[idx1], correction, offsets[idx0], offsets[idx1]);
var supplier = factory.getInt7SQVectorScorerSupplier(sim, in, values, correction).get();
assertThat(supplier.scorer(idx0).score(idx1), equalTo(expected));
var scorer = supplier.scorer();
scorer.setScoringOrdinal(idx0);
assertThat(scorer.score(idx1), equalTo(expected));
}
}
}
Expand Down Expand Up @@ -265,7 +280,7 @@ void testRandomScorerImpl(long maxChunkSize, Function<Integer, float[]> floatArr

var expected = luceneScore(sim, qVectors[idx0], qVectors[idx1], correction, corrections[idx0], corrections[idx1]);
var scorer = factory.getInt7SQVectorScorer(VectorSimilarityType.of(sim), values, vectors[idx0]).get();
assertThat(scorer.score(idx1), equalTo(expected));
assertEquals(scorer.score(idx1), expected, DELTA);
}
}
}
Expand Down Expand Up @@ -313,7 +328,9 @@ void testRandomSliceImpl(int dims, long maxChunkSize, int initialPadding, Functi
var values = vectorValues(dims, size, in, VectorSimilarityType.of(sim));
float expected = luceneScore(sim, vectors[idx0], vectors[idx1], correction, offsets[idx0], offsets[idx1]);
var supplier = factory.getInt7SQVectorScorerSupplier(sim, in, values, correction).get();
assertThat(supplier.scorer(idx0).score(idx1), equalTo(expected));
var scorer = supplier.scorer();
scorer.setScoringOrdinal(idx0);
assertThat(scorer.score(idx1), equalTo(expected));
}
}
}
Expand Down Expand Up @@ -352,7 +369,9 @@ public void testLarge() throws IOException {
var values = vectorValues(dims, size, in, VectorSimilarityType.of(sim));
float expected = luceneScore(sim, vector(idx0, dims), vector(idx1, dims), correction, off0, off1);
var supplier = factory.getInt7SQVectorScorerSupplier(sim, in, values, correction).get();
assertThat(supplier.scorer(idx0).score(idx1), equalTo(expected));
var scorer = supplier.scorer();
scorer.setScoringOrdinal(idx0);
assertThat(scorer.score(idx1), equalTo(expected));
}
}
}
Expand Down Expand Up @@ -391,8 +410,8 @@ void testRaceImpl(VectorSimilarityType sim) throws Exception {
var values = vectorValues(dims, 4, in, VectorSimilarityType.of(sim));
var scoreSupplier = factory.getInt7SQVectorScorerSupplier(sim, in, values, 1f).get();
var tasks = List.<Callable<Optional<Throwable>>>of(
new ScoreCallable(scoreSupplier.copy().scorer(0), 1, expectedScore1),
new ScoreCallable(scoreSupplier.copy().scorer(2), 3, expectedScore2)
new ScoreCallable(scoreSupplier.copy().scorer(), 0, 1, expectedScore1),
new ScoreCallable(scoreSupplier.copy().scorer(), 2, 3, expectedScore2)
);
var executor = Executors.newFixedThreadPool(2);
var results = executor.invokeAll(tasks);
Expand All @@ -408,14 +427,19 @@ void testRaceImpl(VectorSimilarityType sim) throws Exception {

static class ScoreCallable implements Callable<Optional<Throwable>> {

final RandomVectorScorer scorer;
final UpdateableRandomVectorScorer scorer;
final int ord;
final float expectedScore;

ScoreCallable(RandomVectorScorer scorer, int ord, float expectedScore) {
this.scorer = scorer;
this.ord = ord;
this.expectedScore = expectedScore;
ScoreCallable(UpdateableRandomVectorScorer scorer, int queryOrd, int ord, float expectedScore) {
try {
this.scorer = scorer;
this.scorer.setScoringOrdinal(queryOrd);
this.ord = ord;
this.expectedScore = expectedScore;
} catch (IOException e) {
throw new RuntimeException(e);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public abstract class AbstractCompoundWordTokenFilterFactory extends AbstractTok
protected final int maxSubwordSize;
protected final boolean onlyLongestMatch;
protected final CharArraySet wordList;
// TODO expose this parameter?
protected final boolean reuseChars;

protected AbstractCompoundWordTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
super(name);
Expand All @@ -36,6 +38,8 @@ protected AbstractCompoundWordTokenFilterFactory(IndexSettings indexSettings, En
minSubwordSize = settings.getAsInt("min_subword_size", CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE);
maxSubwordSize = settings.getAsInt("max_subword_size", CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE);
onlyLongestMatch = settings.getAsBoolean("only_longest_match", false);
// TODO is the default of true correct? see: https://github.com/apache/lucene/pull/14278
reuseChars = true;
wordList = Analysis.getWordSet(env, settings, "word_list");
if (wordList == null) {
throw new IllegalArgumentException("word_list must be provided for [" + name + "], either as a path to a file, or directly");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ public class DictionaryCompoundWordTokenFilterFactory extends AbstractCompoundWo

@Override
public TokenStream create(TokenStream tokenStream) {
return new DictionaryCompoundWordTokenFilter(tokenStream, wordList, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
return new DictionaryCompoundWordTokenFilter(
tokenStream,
wordList,
minWordSize,
minSubwordSize,
maxSubwordSize,
onlyLongestMatch,
reuseChars
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private static Version parseUnchecked(String version) {
public static final IndexVersion SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_UNSIGNED_LONG = def(9_019_0_00, Version.LUCENE_10_1_0);
public static final IndexVersion SYNTHETIC_SOURCE_STORE_ARRAYS_NATIVELY_SCALED_FLOAT = def(9_020_0_00, Version.LUCENE_10_1_0);
public static final IndexVersion USE_LUCENE101_POSTINGS_FORMAT = def(9_021_0_00, Version.LUCENE_10_1_0);
public static final IndexVersion UPGRADE_TO_LUCENE_10_2_0 = def(9_022_00_0, Version.LUCENE_10_2_0);
/*
* STOP! READ THIS FIRST! No, really,
* ____ _____ ___ ____ _ ____ _____ _ ____ _____ _ _ ___ ____ _____ ___ ____ ____ _____ _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.lucene.util.VectorUtil;
import org.apache.lucene.util.hnsw.RandomVectorScorer;
import org.apache.lucene.util.hnsw.RandomVectorScorerSupplier;
import org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer;
import org.apache.lucene.util.quantization.QuantizedByteVectorValues;

import java.io.IOException;
Expand Down Expand Up @@ -130,18 +131,33 @@ public float score(int i) throws IOException {
}

static class HammingScorerSupplier implements RandomVectorScorerSupplier {
private final ByteVectorValues byteValues, byteValues1, byteValues2;
private final ByteVectorValues byteValues, targetValues;

HammingScorerSupplier(ByteVectorValues byteValues) throws IOException {
this.byteValues = byteValues;
this.byteValues1 = byteValues.copy();
this.byteValues2 = byteValues.copy();
this.targetValues = byteValues.copy();
}

@Override
public RandomVectorScorer scorer(int i) throws IOException {
byte[] query = byteValues1.vectorValue(i);
return new HammingVectorScorer(byteValues2, query);
public UpdateableRandomVectorScorer scorer() throws IOException {
return new UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer(targetValues) {
private final byte[] query = new byte[targetValues.dimension()];
private int currentOrd = -1;

@Override
public void setScoringOrdinal(int i) throws IOException {
if (currentOrd == i) {
return;
}
System.arraycopy(targetValues.vectorValue(i), 0, query, 0, query.length);
this.currentOrd = i;
}

@Override
public float score(int i) throws IOException {
return hammingScore(targetValues.vectorValue(i), query);
}
};
}

@Override
Expand Down
Loading
Loading