diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index b207a95d..00000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Java CI with Maven - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 24 - uses: actions/setup-java@v4 - with: - java-version: '24' - distribution: 'temurin' - cache: maven - - name: Run the Maven verify phase - run: mvn --batch-mode --update-snapshots verify diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..35c99d91 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,68 @@ +name: Test + +on: + push: + branches: ['*'] + pull_request: + branches: ['*'] + +jobs: + test-elasticsearch: + name: Test Elasticsearch=${{ matrix.elasticsearch }} JDK=${{ matrix.java }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + java: [21, 24] + elasticsearch: ['9.0.0', '9.0.7', '9.1.0', '9.1.4'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'maven' + + - name: Set Elasticsearch ${{ matrix.elasticsearch }} in POM + run: | + sed -i "s/.*<\/elasticsearch.version>/${{ matrix.elasticsearch }}<\/elasticsearch.version>/" elasticsearch/pom.xml + echo "Updated Elasticsearch version to ${{ matrix.elasticsearch }}" + grep -A 2 "" elasticsearch/pom.xml + + - name: Build and test + run: mvn verify -B + + test-opensearch: + name: Test OpenSearch=${{ matrix.opensearch }} JDK=${{ matrix.java }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + java: [21, 24] + opensearch: ['2.0.1'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'maven' + + - name: Set OpenSearch ${{ matrix.opensearch }} in POM + run: | + sed -i "s/.*<\/opensearch.version>/${{ matrix.opensearch }}<\/opensearch.version>/" opensearch/pom.xml + echo "Updated OpenSearch version to ${{ matrix.opensearch }}" + grep -A 2 "" opensearch/pom.xml + + - name: Build and test + run: mvn verify -B diff --git a/README.md b/README.md index 6de0a02d..549fa15d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ IK Analysis for Elasticsearch and OpenSearch ================================== ![](./assets/banner.png) +[![Test](https://github.com/infinilabs/analysis-ik/actions/workflows/test.yml/badge.svg)](https://github.com/infinilabs/analysis-ik/actions/workflows/test.yml) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt) The IK Analysis plugin integrates Lucene IK analyzer, and support customized dictionary. It supports major versions of Elasticsearch and OpenSearch. Maintained and supported with ❤️ by [INFINI Labs](https://infinilabs.com). @@ -23,7 +25,7 @@ Alternatively, you can use the `plugin` CLI to install the plugin. Here's how: #### For Elasticsearch: ```bash -bin/elasticsearch-plugin install https://get.infini.cloud/elasticsearch/analysis-ik/8.4.1 +bin/elasticsearch-plugin install https://get.infini.cloud/elasticsearch/analysis-ik/9.1.4 ``` #### For OpenSearch: diff --git a/core/pom.xml b/core/pom.xml index 57b86e9d..6d75ee17 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -13,8 +13,8 @@ jar - 1.8 - 1.8 + 17 + 17 UTF-8 @@ -31,7 +31,7 @@ provided ${lucene.version} - + org.apache.httpcomponents httpclient @@ -41,7 +41,7 @@ org.apache.logging.log4j log4j-api - 2.18.0 + 2.19.0 provided diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml index 4971115f..22685316 100644 --- a/elasticsearch/pom.xml +++ b/elasticsearch/pom.xml @@ -14,8 +14,9 @@ IK Analyzer for Elasticsearch jar - + 9.1.4 + 21 UTF-8 ${project.basedir}/src/main/assemblies/plugin.xml analysis-ik diff --git a/opensearch/pom.xml b/opensearch/pom.xml index 687fba42..35f578ac 100644 --- a/opensearch/pom.xml +++ b/opensearch/pom.xml @@ -16,6 +16,8 @@ + 2.0.1 + 17 UTF-8 ${project.basedir}/src/main/assemblies/plugin.xml analysis-ik diff --git a/pom.xml b/pom.xml index c3a277e4..9922f930 100755 --- a/pom.xml +++ b/pom.xml @@ -17,10 +17,8 @@ 2011 - 9.3.0 - 9.0.0 - 2.0.1 - 1.8 + 10.2.2 + 17 false true