Skip to content

Commit

Permalink
pick Update Lucene from 7.5.0 to 9.9.1 as requested in #1408 to address
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Nov 5, 2024
1 parent cfa4349 commit 7388be1
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<classpathentry exported="true" kind="lib" path="lib/protobuf-java-3.25.5.jar" sourcepath="libsrc/protobuf-java-3.25.5-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javacc.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jakarta.json-1.1.6.jar" sourcepath="libsrc/jakarta.json-1.1.6-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-core-7.7.3.jar" sourcepath="libsrc/lucene-core-7.7.3-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-7.7.3.jar" sourcepath="libsrc/lucene-demo-7.7.3-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-7.7.3.jar" sourcepath="lucene-analyzers-common-7.7.3-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-7.7.3.jar" sourcepath="lucene-queryparser-7.7.3-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-core-9.9.1.jar" sourcepath="libsrc/lucene-core-9.9.1-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-9.9.1.jar" sourcepath="libsrc/lucene-demo-9.9.1-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-analysis-common-9.9.1.jar" sourcepath="lucene-analysis-common-9.9.1-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-9.9.1.jar" sourcepath="lucene-queryparser-9.9.1-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api.jar" sourcepath="libsrc/slf4j-api-1.7.12-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-simple.jar" sourcepath="libsrc/slf4j-simple-1.7.12-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/javax.activation-api-1.2.0.jar" sourcepath="libsrc/javax.activation-api-1.2.0-sources.jar"/>
Expand Down
8 changes: 4 additions & 4 deletions doc/corenlp/pom-full.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>7.7.3</version>
<artifactId>lucene-analysis-common</artifactId>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
Expand Down
14 changes: 7 additions & 7 deletions lib/README
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.jar
lucene-core-9.9.1.jar
lucene-demo-9.9.1.jar
lucene-queryparser-7.5.0.jar
ORIGINAL JAR NAME: n/a
VERSION: 7.7.3
RELEASE DATE: 2020-04-24
VERSION: 9.9.1
RELEASE DATE: 2023-12-16
SOURCE AVAILABLE: yes
DESCRIPTION: "Apache Lucene is a high-performance, full-featured text
search engine library written entirely in Java. It is a technology
Expand All @@ -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-01-17
LAST UPDATE BY: John Bauer

-----------------------------------------------------------------
Expand Down
Binary file added lib/lucene-analysis-common-9.9.1.jar
Binary file not shown.
Binary file removed lib/lucene-analyzers-common-7.7.3.jar
Binary file not shown.
Binary file removed lib/lucene-core-7.7.3.jar
Binary file not shown.
Binary file added lib/lucene-core-9.9.1.jar
Binary file not shown.
Binary file removed lib/lucene-demo-7.7.3.jar
Binary file not shown.
Binary file added lib/lucene-demo-9.9.1.jar
Binary file not shown.
Binary file removed lib/lucene-queryparser-7.7.3.jar
Binary file not shown.
Binary file added lib/lucene-queryparser-9.9.1.jar
Binary file not shown.
Binary file added libsrc/lucene-analysis-common-9.9.1-sources.jar
Binary file not shown.
Binary file removed libsrc/lucene-analyzers-common-7.7.3-sources.jar
Binary file not shown.
Binary file removed libsrc/lucene-core-7.7.3-sources.jar
Binary file not shown.
Binary file added libsrc/lucene-core-9.9.1-sources.jar
Binary file not shown.
Binary file removed libsrc/lucene-demo-7.7.3-sources.jar
Binary file not shown.
Binary file added libsrc/lucene-demo-9.9.1-sources.jar
Binary file not shown.
Binary file removed libsrc/lucene-queryparser-7.7.3-sources.jar
Binary file not shown.
Binary file added libsrc/lucene-queryparser-9.9.1-sources.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions pom-java-11.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>7.7.3</version>
<artifactId>lucene-analysis-common</artifactId>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
Expand Down
8 changes: 4 additions & 4 deletions pom-java-17.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>7.7.3</version>
<artifactId>lucene-analysis-common</artifactId>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>7.7.3</version>
<artifactId>lucene-analysis-common</artifactId>
<version>9.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>7.7.3</version>
<version>9.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
Expand Down
2 changes: 1 addition & 1 deletion src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Set<String> queryIndexGetSentences(CollectionValuedMap<String, String> words) th
//Map<String, List<CoreLabel>> sents = null;
TopDocs tp = searcher.search(query, Integer.MAX_VALUE);
Set<String> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public Map<Integer, Set<E>> 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);
Expand Down

0 comments on commit 7388be1

Please sign in to comment.