Skip to content

Commit 2c574ad

Browse files
committed
Update Lucene from 7.5.0 to 9.9.2 as requested in #1408 to address https://osv.dev/vulnerability/OSV-2023-705
1 parent cfa4349 commit 2c574ad

24 files changed

+29
-29
lines changed

.classpath

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
<classpathentry exported="true" kind="lib" path="lib/protobuf-java-3.25.5.jar" sourcepath="libsrc/protobuf-java-3.25.5-sources.jar"/>
2424
<classpathentry exported="true" kind="lib" path="lib/javacc.jar"/>
2525
<classpathentry exported="true" kind="lib" path="lib/jakarta.json-1.1.6.jar" sourcepath="libsrc/jakarta.json-1.1.6-sources.jar"/>
26-
<classpathentry exported="true" kind="lib" path="lib/lucene-core-7.7.3.jar" sourcepath="libsrc/lucene-core-7.7.3-sources.jar"/>
27-
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-7.7.3.jar" sourcepath="libsrc/lucene-demo-7.7.3-sources.jar"/>
28-
<classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-7.7.3.jar" sourcepath="lucene-analyzers-common-7.7.3-sources.jar"/>
29-
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-7.7.3.jar" sourcepath="lucene-queryparser-7.7.3-sources.jar"/>
26+
<classpathentry exported="true" kind="lib" path="lib/lucene-core-9.9.2.jar" sourcepath="libsrc/lucene-core-9.9.2-sources.jar"/>
27+
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-9.9.2.jar" sourcepath="libsrc/lucene-demo-9.9.2-sources.jar"/>
28+
<classpathentry exported="true" kind="lib" path="lib/lucene-analysis-common-9.9.2.jar" sourcepath="lucene-analysis-common-9.9.2-sources.jar"/>
29+
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-9.9.2.jar" sourcepath="lucene-queryparser-9.9.2-sources.jar"/>
3030
<classpathentry exported="true" kind="lib" path="lib/slf4j-api.jar" sourcepath="libsrc/slf4j-api-1.7.12-sources.jar"/>
3131
<classpathentry exported="true" kind="lib" path="lib/slf4j-simple.jar" sourcepath="libsrc/slf4j-simple-1.7.12-sources.jar"/>
3232
<classpathentry exported="true" kind="lib" path="lib/javax.activation-api-1.2.0.jar" sourcepath="libsrc/javax.activation-api-1.2.0-sources.jar"/>

doc/corenlp/pom-full.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@
6262
<dependency>
6363
<groupId>org.apache.lucene</groupId>
6464
<artifactId>lucene-queryparser</artifactId>
65-
<version>7.7.3</version>
65+
<version>9.9.2</version>
6666
</dependency>
6767

6868
<dependency>
6969
<groupId>org.apache.lucene</groupId>
70-
<artifactId>lucene-analyzers-common</artifactId>
71-
<version>7.7.3</version>
70+
<artifactId>lucene-analysis-common</artifactId>
71+
<version>9.9.2</version>
7272
</dependency>
7373

7474
<dependency>
7575
<groupId>org.apache.lucene</groupId>
7676
<artifactId>lucene-core</artifactId>
77-
<version>7.7.3</version>
77+
<version>9.9.2</version>
7878
</dependency>
7979

8080
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

lib/README

+7-7
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ LAST UPDATE: 2024-10-08
378378
LAST UPDATE BY: John Bauer. Originally added by Sonal Gupta
379379

380380
-----------------------------------------------------------------------
381-
lucene-analyzers-common-7.7.3.jar
382-
lucene-core-7.7.3.jar
383-
lucene-demo-7.7.3.jar
384-
lucene-queryparser-7.7.3.jar
381+
lucene-analysis-common-9.9.2.jar
382+
lucene-core-9.9.2.jar
383+
lucene-demo-9.9.2.jar
384+
lucene-queryparser-9.9.2.jar
385385
ORIGINAL JAR NAME: n/a
386-
VERSION: 7.7.3
387-
RELEASE DATE: 2020-04-24
386+
VERSION: 9.9.2
387+
RELEASE DATE: 2024-01-29
388388
SOURCE AVAILABLE: yes
389389
DESCRIPTION: "Apache Lucene is a high-performance, full-featured text
390390
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."
394394
URL: http://lucene.apache.org/
395395
USED BY: patterns.surface
396396

397-
LAST UPDATE: 2024-10-08
397+
LAST UPDATE: 2024-11-05
398398
LAST UPDATE BY: John Bauer
399399

400400
-----------------------------------------------------------------

lib/lucene-analysis-common-9.9.2.jar

1.65 MB
Binary file not shown.

lib/lucene-analyzers-common-7.7.3.jar

-1.59 MB
Binary file not shown.

lib/lucene-core-7.7.3.jar

-2.95 MB
Binary file not shown.

lib/lucene-core-9.9.2.jar

3.78 MB
Binary file not shown.

lib/lucene-demo-7.7.3.jar

-42.9 KB
Binary file not shown.

lib/lucene-demo-9.9.2.jar

65 KB
Binary file not shown.

lib/lucene-queryparser-7.7.3.jar

-373 KB
Binary file not shown.

lib/lucene-queryparser-9.9.2.jar

413 KB
Binary file not shown.
1.31 MB
Binary file not shown.
-1.58 MB
Binary file not shown.

libsrc/lucene-core-7.7.3-sources.jar

-2.03 MB
Binary file not shown.

libsrc/lucene-core-9.9.2-sources.jar

2.53 MB
Binary file not shown.

libsrc/lucene-demo-7.7.3-sources.jar

-38.3 KB
Binary file not shown.

libsrc/lucene-demo-9.9.2-sources.jar

55.7 KB
Binary file not shown.
-379 KB
Binary file not shown.
392 KB
Binary file not shown.

pom-java-11.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
<dependency>
6161
<groupId>org.apache.lucene</groupId>
6262
<artifactId>lucene-queryparser</artifactId>
63-
<version>7.7.3</version>
63+
<version>9.9.2</version>
6464
</dependency>
6565

6666
<dependency>
6767
<groupId>org.apache.lucene</groupId>
68-
<artifactId>lucene-analyzers-common</artifactId>
69-
<version>7.7.3</version>
68+
<artifactId>lucene-analysis-common</artifactId>
69+
<version>9.9.2</version>
7070
</dependency>
7171

7272
<dependency>
7373
<groupId>org.apache.lucene</groupId>
7474
<artifactId>lucene-core</artifactId>
75-
<version>7.7.3</version>
75+
<version>9.9.2</version>
7676
</dependency>
7777

7878
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

pom-java-17.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
<dependency>
6161
<groupId>org.apache.lucene</groupId>
6262
<artifactId>lucene-queryparser</artifactId>
63-
<version>7.7.3</version>
63+
<version>9.9.2</version>
6464
</dependency>
6565

6666
<dependency>
6767
<groupId>org.apache.lucene</groupId>
68-
<artifactId>lucene-analyzers-common</artifactId>
69-
<version>7.7.3</version>
68+
<artifactId>lucene-analysis-common</artifactId>
69+
<version>9.9.2</version>
7070
</dependency>
7171

7272
<dependency>
7373
<groupId>org.apache.lucene</groupId>
7474
<artifactId>lucene-core</artifactId>
75-
<version>7.7.3</version>
75+
<version>9.9.2</version>
7676
</dependency>
7777

7878
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@
6262
<dependency>
6363
<groupId>org.apache.lucene</groupId>
6464
<artifactId>lucene-queryparser</artifactId>
65-
<version>7.7.3</version>
65+
<version>9.9.2</version>
6666
</dependency>
6767

6868
<dependency>
6969
<groupId>org.apache.lucene</groupId>
70-
<artifactId>lucene-analyzers-common</artifactId>
71-
<version>7.7.3</version>
70+
<artifactId>lucene-analysis-common</artifactId>
71+
<version>9.9.2</version>
7272
</dependency>
7373

7474
<dependency>
7575
<groupId>org.apache.lucene</groupId>
7676
<artifactId>lucene-core</artifactId>
77-
<version>7.7.3</version>
77+
<version>9.9.2</version>
7878
</dependency>
7979

8080
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Set<String> queryIndexGetSentences(CollectionValuedMap<String, String> words) th
152152
//Map<String, List<CoreLabel>> sents = null;
153153
TopDocs tp = searcher.search(query, Integer.MAX_VALUE);
154154
Set<String> sentids = new HashSet<>();
155-
if (tp.totalHits > 0) {
155+
if (tp.totalHits.value > 0) {
156156
for (ScoreDoc s : tp.scoreDocs) {
157157
int docId = s.doc;
158158
Document d = searcher.doc(docId);

src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public Map<Integer, Set<E>> getPatternsForAllTokens(String sentId) {
249249
try {
250250
TermQuery query = new TermQuery(new Term("sentid", sentId));
251251
TopDocs tp = searcher.search(query,1);
252-
if (tp.totalHits > 0) {
252+
if (tp.totalHits.value > 0) {
253253
for (ScoreDoc s : tp.scoreDocs) {
254254
int docId = s.doc;
255255
Document d = searcher.doc(docId);

0 commit comments

Comments
 (0)