Skip to content

Commit d740e9c

Browse files
committed
More 10.0.x updates.
1 parent bf6546e commit d740e9c

File tree

7 files changed

+2043
-864
lines changed

7 files changed

+2043
-864
lines changed

install_pylucene.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ export PATH="$PATH:$(pwd)/ant/bin"
3333
# https://lucene.apache.org/pylucene/jcc/install.html
3434
cd pylucene
3535
pushd jcc
36-
# IMPORTANT: Need java 17 (21 for pylucene v10.0.0)
37-
#export JCC_INCLUDES=/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/include:/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/include/darwin
38-
export JCC_INCLUDES=/opt/homebrew/Cellar/openjdk@21/21.0.9/libexec/openjdk.jdk/Contents/Home/include:/opt/homebrew/Cellar/openjdk@21/21.0.9/libexec/openjdk.jdk/Contents/Home/include/darwin
36+
export JCC_INCLUDES=/opt/homebrew/Cellar/openjdk@21/21.0.10/libexec/openjdk.jdk/Contents/Home/include:/opt/homebrew/Cellar/openjdk@21/21.0.10/libexec/openjdk.jdk/Contents/Home/include/darwin
3937

4038
uv run setup.py build
4139
uv run setup.py install

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies = [
1313
"furo>=2024.8.6",
1414
"ir-datasets>=0.5.11",
1515
"ir-measures>=0.3.7",
16+
"jcc>=3.15",
1617
"jupyter>=1.1.1",
1718
"jupyterlab>=4.4.4",
1819
"lucene",
@@ -41,3 +42,4 @@ dev = [
4142

4243
[tool.uv.sources]
4344
pybool-ir = { workspace = true }
45+
lucene = { path = "pylucene/dist/lucene-10.0.0-cp313-cp313-macosx_11_0_arm64.whl" }

src/pybool_ir/query/generic/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
assert lucene.getVMEnv() or lucene.initVM()
3030
Q = engine.Query
31-
search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
31+
# TODO https://lucene.apache.org/core/10_0_0/MIGRATE.html
32+
# search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
3233

3334
# Makes parsing faster. (?)
3435
ParserElement.enablePackrat()

src/pybool_ir/query/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from pybool_ir.query.ast import ASTNode
1111

12+
# TODO https://lucene.apache.org/core/10_0_0/MIGRATE.html
1213
MAX_CLAUSES = 60_000
1314

1415
assert lucene.getVMEnv() or lucene.initVM()

src/pybool_ir/query/pubmed/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030

3131
assert lucene.getVMEnv() or lucene.initVM()
3232
Q = engine.Query
33-
search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
33+
# TODO https://lucene.apache.org/core/10_0_0/MIGRATE.html
34+
#search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
3435
analyzer = engine.analyzers.Analyzer.standard()
3536

3637

src/pybool_ir/query/units.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
assert lucene.getVMEnv() or lucene.initVM()
1515
Q = engine.Query
16-
search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
16+
# TODO https://lucene.apache.org/core/10_0_0/MIGRATE.html
17+
#search.BooleanQuery.setMaxClauseCount(MAX_CLAUSES) # There is apparently a cap for efficiency reasons.
1718
analyzer = engine.analyzers.Analyzer.standard()
1819

1920

uv.lock

Lines changed: 2033 additions & 858 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)