Commit 3521813
fix: Upgrade to Lucene 10.x and fix API compatibility for record types (#14)
* Initial plan
* Fix Lucene 10.x API compatibility: use record accessor methods
In Lucene 10.x, TotalHits, BooleanClause, and BoostQuery are now Java records.
Direct field access and old getter methods must be replaced with record accessor methods:
- TotalHits.value -> TotalHits.value()
- BooleanClause.getQuery() -> BooleanClause.query()
- BooleanClause.getOccur() -> BooleanClause.occur()
- BoostQuery.getQuery() -> BoostQuery.query()
- BoostQuery.getBoost() -> BoostQuery.boost()
Fixes #7
Co-authored-by: unknowIfGuestInDream <[email protected]>
* Update to Lucene 10.x and Eclipse 2024-12
- Update target-platform.target to use Eclipse 2024-12 and Orbit 2024-12
- Update MANIFEST.MF to require Lucene 10.0.0+ and Java 21
- Update feature.xml to require Lucene 10.0.0+
- Keep Lucene 10.x API changes (record accessor methods)
Co-authored-by: unknowIfGuestInDream <[email protected]>
* Improve JDK
* feat: Improve target lucene
* Revert to Lucene 9.x API: Eclipse Orbit doesn't have Lucene 10.x yet
Lucene 10.x bundles are not available in Eclipse Orbit repositories yet.
Reverting all changes back to use Lucene 9.x API which is what's available
in Eclipse Orbit 2024-06.
The original runtime error reported by users is likely caused by running
Eclipse versions that bundle newer Lucene versions not yet officially
supported in Orbit.
Co-authored-by: unknowIfGuestInDream <[email protected]>
* Upgrade to Lucene 10.x, JDK 21, and Eclipse 2025-03
- Update target-platform.target to Eclipse 2025-03 and Orbit 2025-03
- Update MANIFEST.MF to require Lucene 10.0.0+ and Java 21
- Update feature.xml to require Lucene 10.0.0+
- Update Java source files to use Lucene 10.x record accessor methods:
- TotalHits.value -> TotalHits.value()
- BooleanClause.getQuery() -> BooleanClause.query()
- BooleanClause.getOccur() -> BooleanClause.occur()
- BoostQuery.getQuery() -> BoostQuery.query()
- BoostQuery.getBoost() -> BoostQuery.boost()
- Update all workflow files to use Java 21
- Update Eclipse project settings for Java 21
- Update README to reflect new requirements
Co-authored-by: unknowIfGuestInDream <[email protected]>
* Fix BoostQuery API: use getQuery() and getBoost() instead of record accessors
BoostQuery is not a record in Lucene 10.x, unlike TotalHits and BooleanClause.
It still uses the traditional getter methods getQuery() and getBoost().
Co-authored-by: unknowIfGuestInDream <[email protected]>
* build: Prepare for 1.1.0
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: unknowIfGuestInDream <[email protected]>
Co-authored-by: 梦里不知身是客 <[email protected]>1 parent cac7616 commit 3521813
File tree
17 files changed
+41
-36
lines changed- .github/workflows
- features/com.tlcsdm.eclipse.instasearch.feature
- plugins/com.tlcsdm.eclipse.instasearch
- .settings
- META-INF
- src/com/tlcsdm/eclipse/instasearch/indexing
- querying
- sites/com.tlcsdm.eclipse.instasearch.site
17 files changed
+41
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | | - | |
| 15 | + | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | | - | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
| 306 | + | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
0 commit comments