diff --git a/.classpath b/.classpath
index fc58f24b83..5d16c5fb58 100644
--- a/.classpath
+++ b/.classpath
@@ -23,10 +23,10 @@
-
-
-
-
+
+
+
+
diff --git a/doc/corenlp/pom-full.xml b/doc/corenlp/pom-full.xml
index bee2a2eecf..2e1cd59d1d 100644
--- a/doc/corenlp/pom-full.xml
+++ b/doc/corenlp/pom-full.xml
@@ -62,19 +62,19 @@
org.apache.lucene
lucene-queryparser
- 7.7.3
+ 9.9.2
org.apache.lucene
- lucene-analyzers-common
- 7.7.3
+ lucene-analysis-common
+ 9.9.2
org.apache.lucene
lucene-core
- 7.7.3
+ 9.9.2
diff --git a/lib/README b/lib/README
index d7190975fa..f4554e21cb 100644
--- a/lib/README
+++ b/lib/README
@@ -378,13 +378,13 @@ LAST UPDATE: 2024-10-08
LAST UPDATE BY: John Bauer. Originally added by Sonal Gupta
-----------------------------------------------------------------------
-lucene-analyzers-common-7.7.3.jar
-lucene-core-7.7.3.jar
-lucene-demo-7.7.3.jar
-lucene-queryparser-7.7.3.jar
+lucene-analysis-common-9.9.2.jar
+lucene-core-9.9.2.jar
+lucene-demo-9.9.2.jar
+lucene-queryparser-9.9.2.jar
ORIGINAL JAR NAME: n/a
-VERSION: 7.7.3
-RELEASE DATE: 2020-04-24
+VERSION: 9.9.2
+RELEASE DATE: 2024-01-29
SOURCE AVAILABLE: yes
DESCRIPTION: "Apache Lucene is a high-performance, full-featured text
search engine library written entirely in Java. It is a technology
@@ -394,7 +394,7 @@ in has version number, as before. Broken into several Jars in this version."
URL: http://lucene.apache.org/
USED BY: patterns.surface
-LAST UPDATE: 2024-10-08
+LAST UPDATE: 2024-11-05
LAST UPDATE BY: John Bauer
-----------------------------------------------------------------
diff --git a/lib/lucene-analysis-common-9.9.2.jar b/lib/lucene-analysis-common-9.9.2.jar
new file mode 100644
index 0000000000..bc6bd20c7f
Binary files /dev/null and b/lib/lucene-analysis-common-9.9.2.jar differ
diff --git a/lib/lucene-analyzers-common-7.7.3.jar b/lib/lucene-analyzers-common-7.7.3.jar
deleted file mode 100644
index 47b9b1374c..0000000000
Binary files a/lib/lucene-analyzers-common-7.7.3.jar and /dev/null differ
diff --git a/lib/lucene-core-7.7.3.jar b/lib/lucene-core-7.7.3.jar
deleted file mode 100644
index 463f757a66..0000000000
Binary files a/lib/lucene-core-7.7.3.jar and /dev/null differ
diff --git a/lib/lucene-core-9.9.2.jar b/lib/lucene-core-9.9.2.jar
new file mode 100644
index 0000000000..e41f467853
Binary files /dev/null and b/lib/lucene-core-9.9.2.jar differ
diff --git a/lib/lucene-demo-7.7.3.jar b/lib/lucene-demo-7.7.3.jar
deleted file mode 100644
index 8fafe2128d..0000000000
Binary files a/lib/lucene-demo-7.7.3.jar and /dev/null differ
diff --git a/lib/lucene-demo-9.9.2.jar b/lib/lucene-demo-9.9.2.jar
new file mode 100644
index 0000000000..02970a9f2b
Binary files /dev/null and b/lib/lucene-demo-9.9.2.jar differ
diff --git a/lib/lucene-queryparser-7.7.3.jar b/lib/lucene-queryparser-7.7.3.jar
deleted file mode 100644
index e1f012f8fd..0000000000
Binary files a/lib/lucene-queryparser-7.7.3.jar and /dev/null differ
diff --git a/lib/lucene-queryparser-9.9.2.jar b/lib/lucene-queryparser-9.9.2.jar
new file mode 100644
index 0000000000..fc2405b62c
Binary files /dev/null and b/lib/lucene-queryparser-9.9.2.jar differ
diff --git a/libsrc/lucene-analysis-common-9.9.2-sources.jar b/libsrc/lucene-analysis-common-9.9.2-sources.jar
new file mode 100644
index 0000000000..610b6491f9
Binary files /dev/null and b/libsrc/lucene-analysis-common-9.9.2-sources.jar differ
diff --git a/libsrc/lucene-analyzers-common-7.7.3-sources.jar b/libsrc/lucene-analyzers-common-7.7.3-sources.jar
deleted file mode 100644
index 3bace5f910..0000000000
Binary files a/libsrc/lucene-analyzers-common-7.7.3-sources.jar and /dev/null differ
diff --git a/libsrc/lucene-core-7.7.3-sources.jar b/libsrc/lucene-core-7.7.3-sources.jar
deleted file mode 100644
index c391950209..0000000000
Binary files a/libsrc/lucene-core-7.7.3-sources.jar and /dev/null differ
diff --git a/libsrc/lucene-core-9.9.2-sources.jar b/libsrc/lucene-core-9.9.2-sources.jar
new file mode 100644
index 0000000000..731cd4b847
Binary files /dev/null and b/libsrc/lucene-core-9.9.2-sources.jar differ
diff --git a/libsrc/lucene-demo-7.7.3-sources.jar b/libsrc/lucene-demo-7.7.3-sources.jar
deleted file mode 100644
index dc390ac31e..0000000000
Binary files a/libsrc/lucene-demo-7.7.3-sources.jar and /dev/null differ
diff --git a/libsrc/lucene-demo-9.9.2-sources.jar b/libsrc/lucene-demo-9.9.2-sources.jar
new file mode 100644
index 0000000000..a701e76865
Binary files /dev/null and b/libsrc/lucene-demo-9.9.2-sources.jar differ
diff --git a/libsrc/lucene-queryparser-7.7.3-sources.jar b/libsrc/lucene-queryparser-7.7.3-sources.jar
deleted file mode 100644
index c7a7b3b4b1..0000000000
Binary files a/libsrc/lucene-queryparser-7.7.3-sources.jar and /dev/null differ
diff --git a/libsrc/lucene-queryparser-9.9.2-sources.jar b/libsrc/lucene-queryparser-9.9.2-sources.jar
new file mode 100644
index 0000000000..c46f005b77
Binary files /dev/null and b/libsrc/lucene-queryparser-9.9.2-sources.jar differ
diff --git a/pom-java-11.xml b/pom-java-11.xml
index 95de64c1e1..2f63428210 100644
--- a/pom-java-11.xml
+++ b/pom-java-11.xml
@@ -60,19 +60,19 @@
org.apache.lucene
lucene-queryparser
- 7.7.3
+ 9.9.2
org.apache.lucene
- lucene-analyzers-common
- 7.7.3
+ lucene-analysis-common
+ 9.9.2
org.apache.lucene
lucene-core
- 7.7.3
+ 9.9.2
diff --git a/pom-java-17.xml b/pom-java-17.xml
index ae8a753adc..f1d23c67d0 100644
--- a/pom-java-17.xml
+++ b/pom-java-17.xml
@@ -60,19 +60,19 @@
org.apache.lucene
lucene-queryparser
- 7.7.3
+ 9.9.2
org.apache.lucene
- lucene-analyzers-common
- 7.7.3
+ lucene-analysis-common
+ 9.9.2
org.apache.lucene
lucene-core
- 7.7.3
+ 9.9.2
diff --git a/pom.xml b/pom.xml
index bee2a2eecf..2e1cd59d1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,19 +62,19 @@
org.apache.lucene
lucene-queryparser
- 7.7.3
+ 9.9.2
org.apache.lucene
- lucene-analyzers-common
- 7.7.3
+ lucene-analysis-common
+ 9.9.2
org.apache.lucene
lucene-core
- 7.7.3
+ 9.9.2
diff --git a/src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java b/src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java
index b4a4443833..d8cce991b5 100644
--- a/src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java
+++ b/src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java
@@ -152,7 +152,7 @@ Set queryIndexGetSentences(CollectionValuedMap words) th
//Map> sents = null;
TopDocs tp = searcher.search(query, Integer.MAX_VALUE);
Set sentids = new HashSet<>();
- if (tp.totalHits > 0) {
+ if (tp.totalHits.value > 0) {
for (ScoreDoc s : tp.scoreDocs) {
int docId = s.doc;
Document d = searcher.doc(docId);
diff --git a/src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java b/src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java
index 60c5425017..ad49ae53d4 100644
--- a/src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java
+++ b/src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java
@@ -249,7 +249,7 @@ public Map> getPatternsForAllTokens(String sentId) {
try {
TermQuery query = new TermQuery(new Term("sentid", sentId));
TopDocs tp = searcher.search(query,1);
- if (tp.totalHits > 0) {
+ if (tp.totalHits.value > 0) {
for (ScoreDoc s : tp.scoreDocs) {
int docId = s.doc;
Document d = searcher.doc(docId);