File tree Expand file tree Collapse file tree 7 files changed +2043
-864
lines changed
Expand file tree Collapse file tree 7 files changed +2043
-864
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ export PATH="$PATH:$(pwd)/ant/bin"
3333# https://lucene.apache.org/pylucene/jcc/install.html
3434cd pylucene
3535pushd 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
4038uv run setup.py build
4139uv run setup.py install
Original file line number Diff line number Diff 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 ]
4344pybool-ir = { workspace = true }
45+ lucene = { path = " pylucene/dist/lucene-10.0.0-cp313-cp313-macosx_11_0_arm64.whl" }
Original file line number Diff line number Diff line change 2828
2929assert lucene .getVMEnv () or lucene .initVM ()
3030Q = 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. (?)
3435ParserElement .enablePackrat ()
Original file line number Diff line number Diff line change 99
1010from pybool_ir .query .ast import ASTNode
1111
12+ # TODO https://lucene.apache.org/core/10_0_0/MIGRATE.html
1213MAX_CLAUSES = 60_000
1314
1415assert lucene .getVMEnv () or lucene .initVM ()
Original file line number Diff line number Diff line change 3030
3131assert lucene .getVMEnv () or lucene .initVM ()
3232Q = 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.
3435analyzer = engine .analyzers .Analyzer .standard ()
3536
3637
Original file line number Diff line number Diff line change 1313
1414assert lucene .getVMEnv () or lucene .initVM ()
1515Q = 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.
1718analyzer = engine .analyzers .Analyzer .standard ()
1819
1920
You can’t perform that action at this time.
0 commit comments