Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ repositories {
dependencies {
// implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.apache.commons:commons-compress:1.12")
implementation("com.chenlb.mmseg4j:mmseg4j-analysis:1.8.6")
implementation("com.chenlb.mmseg4j:mmseg4j-dic:1.8.6")

implementation("org.jdom:jdom2:2.0.6.1")
implementation("org.apache.lucene:lucene-analyzers:3.6.2")
// To upgrade Lucene, change to
// implementation("org.apache.lucene:lucene-analyzers-common:x")
implementation("org.apache.lucene:lucene-analyzers-common:4.7.0")
implementation("org.apache.lucene:lucene-queryparser:4.7.0")
implementation("org.apache.lucene:lucene-analyzers-smartcn:4.7.0")

//implementation("org.slf4j:slf4j-api:1.7.6")
implementation("org.slf4j:slf4j-api:1.7.6")

testImplementation("org.slf4j:slf4j-simple:1.7.6")
testImplementation("junit:junit:4.13")
}
Expand Down
161 changes: 58 additions & 103 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>org.crosswire</groupId>
<artifactId>jsword</artifactId>
<packaging>jar</packaging>
<version>2.1-SNAPSHOT</version>
<name>jsword</name>
<url>http://www.crosswire.org/jsword</url>
<modelVersion>4.0.0</modelVersion>
<groupId>org.crosswire</groupId>
<artifactId>jsword</artifactId>
<packaging>jar</packaging>
<version>2.0.1-luceneupgrade-SNAPSHOT</version>
<name>jsword</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -17,17 +17,17 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<!-- version management -->
<slf4j.version>1.7.6</slf4j.version>
<!-- <commons-codec.version>1.10</commons-codec.version> -->
<!-- <commons-net.version>3.9.0</commons-net.version> -->
<commons-compress.version>1.26.0</commons-compress.version>
<!-- <xz.version>1.6</xz.version> xz is impl within commons-compress -->
<jdom.version>2.0.6.1</jdom.version>
<lucene.version>3.6.2</lucene.version>
<!-- <icu4j.version>59.1</icu4j.version> Brought in by lucene -->
<!-- <httpcomponents-httpcore.version>4.4</httpcomponents-httpcore.version> replaced with javax impl -->
<!-- <httpcomponents-httpclient.version>4.5.13</httpcomponents-httpclient.version> replace with javax impl -->
<!-- version management -->
<junit.version>4.11</junit.version>
<slf4j.version>1.7.2</slf4j.version>
<commons-codec.version>1.9</commons-codec.version>
<commons-logging.version>1.1.1</commons-logging.version>
<commons-net.version>3.3</commons-net.version>
<commons-compress.version>1.7</commons-compress.version>
<xz.version>1.4</xz.version>
<jdom.version>2.0.5</jdom.version>
<lucene.version>4.7.0</lucene.version> <!-- lucene 4.8.0 require java7 -->
<icu4j.version>52.1</icu4j.version>

<!-- maven plugin versions -->
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
Expand Down Expand Up @@ -72,92 +72,47 @@
<scope>test</scope>
</dependency>

<!--
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-snowball</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-smartcn</artifactId>
<version>${lucene.version}</version>
</dependency>
-->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>com.chenlb.mmseg4j</groupId>
<artifactId>mmseg4j-analysis</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>com.chenlb.mmseg4j</groupId>
<artifactId>mmseg4j-dic</artifactId>
<version>1.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-smartcn</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${lucene.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>${xz.version}</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>${jdom.version}</version>
</dependency>

<!--
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net.version}</version>
</dependency>
-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
<version>${xz.version}</version>
</dependency>
-->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>${jdom.version}</version>
</dependency>

<!--
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${httpcomponents-httpcore.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpcomponents-httpclient.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
-->
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.IOException;

import org.apache.lucene.util.Version;
import org.crosswire.common.util.PropertyMap;
import org.crosswire.common.util.ResourceUtil;
import org.crosswire.jsword.book.Book;
Expand Down Expand Up @@ -53,6 +54,13 @@ public final class IndexMetadata {
public static final String LATEST_INDEX_VERSION = "Latest.Index.Version";
public static final String LUCENE_VERSION = "Lucene.Version";

/*This is the LuceneVersion actually used for indexing & query-parsing. Tested with:
LUCENE_30 : I have not found any compatibility issue using JSword created indexes
LUCENE_31 : Tested with French FreSegond & Chinese ChiNCVs bible. Some differences found. So index is not back compatible
LUCENE_48 : Same as LUCENE_31
*/
public static final org.apache.lucene.util.Version LUCENE_IDXVERSION_FOR_INDEXING = Version.LUCENE_30; //Change this create index with newer Version format

public static final String PREFIX_LATEST_INDEX_VERSION_BOOK_OVERRIDE = "Latest.Index.Version.Book.";
/**
* @deprecated do not use
Expand Down
Loading