Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .github/workflows/ci-index-es-dummy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
strategy:
matrix:
include:
- module: es
args: "-Pelasticsearch9"
name: es9-java8
java: 8
- module: es
args: "-Pelasticsearch8"
name: es8
Expand All @@ -47,6 +51,11 @@ jobs:
args: "-Pelasticsearch60"
name: es60
java: 8
- module: es
install-args: "-Pjava-11"
args: "-Pelasticsearch9"
name: es9
java: 11
- module: es
install-args: "-Pjava-11"
args: "-Pelasticsearch8"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci-index-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
fail-fast: false
matrix:
include:
- module: es
args: "-Pelasticsearch9"
name: es9-java8
java: 8
- module: es
args: "-Pelasticsearch8"
name: es8-java8
Expand All @@ -82,6 +86,11 @@ jobs:
args: "-Pelasticsearch60"
name: es60-java8
java: 8
- module: es
install-args: "-Pjava-11"
args: "-Pelasticsearch9"
name: es9
java: 11
- module: es
install-args: "-Pjava-11"
args: "-Pelasticsearch8"
Expand Down
10 changes: 8 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All currently supported versions of JanusGraph are listed below.

| JanusGraph | Storage Version | Cassandra | HBase | Bigtable | ScyllaDB | Elasticsearch | Solr | TinkerPop | Spark | Scala |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| 1.2.z | 2 | 3.11.z, 4.0.z | 2.6.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y | 6.y, 7.y, 8.y | 8.y | 3.7.z | 3.2.z | 2.12.z |
| 1.2.z | 2 | 3.11.z, 4.0.z | 2.6.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y | 6.y, 7.y, 8.y, 9.y | 8.y | 3.7.z | 3.2.z | 2.12.z |
| 1.1.z | 2 | 3.11.z, 4.0.z | 2.6.z | 1.3.0, 1.4.0, 1.5.z, 1.6.z, 1.7.z, 1.8.z, 1.9.z, 1.10.z, 1.11.z, 1.14.z | 6.y | 6.y, 7.y, 8.y | 8.y | 3.7.z | 3.2.z | 2.12.z |

!!! info
Expand Down Expand Up @@ -75,7 +75,7 @@ compile "org.janusgraph:janusgraph-core:1.2.0"
* Apache HBase 2.6.0
* Oracle BerkeleyJE 7.5.11
* ScyllaDB 6.2.0
* Elasticsearch 6.0.1, 6.6.0, 7.17.8, 8.15.3
* Elasticsearch 6.0.1, 6.6.0, 7.17.8, 8.15.3, 9.0.3
* Apache Lucene 8.11.1
* Apache Solr 8.11.1
* Apache TinkerPop 3.7.3
Expand All @@ -99,6 +99,12 @@ For more information on features and bug fixes in 1.2.0, see the GitHub mileston
* [JanusGraph zip](https://github.com/JanusGraph/janusgraph/releases/download/v1.2.0/janusgraph-1.2.0.zip)
* [JanusGraph zip with embedded Cassandra and ElasticSearch](https://github.com/JanusGraph/janusgraph/releases/download/v1.2.0/janusgraph-full-1.2.0.zip)

#### Upgrade Instructions

##### ElasticSearch 9 support

Starting from version 1.2.0 JanusGraph supports ElasticSearch 9.

### Version 1.1.0 (Release Date: November 7, 2024)

/// tab | Maven
Expand Down
13 changes: 10 additions & 3 deletions janusgraph-es/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<elasticsearch60.docker.version>6.0.1</elasticsearch60.docker.version>
<elasticsearch6.docker.version>6.6.0</elasticsearch6.docker.version>
<elasticsearch7.docker.version>7.17.8</elasticsearch7.docker.version>
<elasticsearch8.docker.version>${elasticsearch.version}</elasticsearch8.docker.version>
<elasticsearch.docker.version>${elasticsearch8.docker.version}</elasticsearch.docker.version>
<elasticsearch8.docker.version>8.15.3</elasticsearch8.docker.version>
<elasticsearch9.docker.version>${elasticsearch.version}</elasticsearch9.docker.version>
<elasticsearch.docker.version>${elasticsearch9.docker.version}</elasticsearch.docker.version>
<skip.es.test>${skipTests}</skip.es.test>
<elasticsearch.docker.image>docker.elastic.co/elasticsearch/elasticsearch</elasticsearch.docker.image>
</properties>
Expand Down Expand Up @@ -198,11 +199,17 @@
</profile>
<profile>
<id>elasticsearch8</id>
<properties>
<elasticsearch.docker.version>${elasticsearch8.docker.version}</elasticsearch.docker.version>
</properties>
</profile>
<profile>
<id>elasticsearch9</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<elasticsearch.docker.version>${elasticsearch8.docker.version}</elasticsearch.docker.version>
<elasticsearch.docker.version>${elasticsearch9.docker.version}</elasticsearch.docker.version>
</properties>
</profile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum ElasticMajorVersion {

EIGHT(8),

NINE(9),
;

static final Pattern PATTERN = Pattern.compile("(\\d+)\\.\\d+\\.\\d+.*");
Expand All @@ -48,6 +49,8 @@ public static ElasticMajorVersion parse(final String value) {
return ElasticMajorVersion.SEVEN;
case 8:
return ElasticMajorVersion.EIGHT;
case 9:
return ElasticMajorVersion.NINE;
default:
throw new IllegalArgumentException("Unsupported Elasticsearch server major version: " + value);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2023 JanusGraph Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.janusgraph.diskstorage.es.compat;

import org.janusgraph.diskstorage.indexing.IndexFeatures;

import static org.janusgraph.diskstorage.es.ElasticSearchConstants.CUSTOM_ALL_FIELD;

public class ES9Compat extends AbstractESCompat {

private static final IndexFeatures FEATURES = coreFeatures().setWildcardField(CUSTOM_ALL_FIELD).supportsGeoContains().build();

@Override
public IndexFeatures getIndexFeatures() {
return FEATURES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public static AbstractESCompat acquireCompatForVersion(ElasticMajorVersion elast
return new ES7Compat();
case EIGHT:
return new ES8Compat();
case NINE:
return new ES9Compat();
default:
throw new PermanentBackendException("Unsupported Elasticsearch version: " + elasticMajorVersion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class RestElasticSearchClient implements ElasticSearchClient {
mapWriter = mapper.writerWithView(Map.class);
}

private static final ElasticMajorVersion DEFAULT_VERSION = ElasticMajorVersion.EIGHT;
private static final ElasticMajorVersion DEFAULT_VERSION = ElasticMajorVersion.NINE;

private static final Function<StringBuilder, StringBuilder> APPEND_OP = sb -> sb.append(sb.length() == 0 ? REQUEST_PARAM_BEGINNING : REQUEST_PARAM_SEPARATOR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

/**
* @author Matthias Broecheler (me@matthiasb.com)
Expand Down Expand Up @@ -229,9 +228,6 @@ public void testErrorInBatch() throws Exception {
String message = Throwables.getRootCause(janusGraphException).getMessage();

switch (JanusGraphElasticsearchContainer.getEsMajorVersion().value){
case 8:
assertTrue(message.contains("document_parsing_exception"));
break;
case 7:
case 6:
assertTrue(message.contains("mapper_parsing_exception"));
Expand All @@ -240,7 +236,7 @@ public void testErrorInBatch() throws Exception {
assertTrue(message.contains("number_format_exception"));
break;
default:
fail();
assertTrue(message.contains("document_parsing_exception"));
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class JanusGraphElasticsearchContainer extends ElasticsearchContainer {

private static final Integer ELASTIC_PORT = 9200;
private static final String DEFAULT_VERSION = "8.15.3";
private static final String DEFAULT_VERSION = "9.0.3";
private static final String DEFAULT_IMAGE = "docker.elastic.co/elasticsearch/elasticsearch";

public static ElasticMajorVersion getEsMajorVersion() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<!-- align with org.apache.spark:spark-core_2.12 -->
<jackson2.version>2.17.2</jackson2.version>
<lucene-solr.version>8.11.3</lucene-solr.version>
<elasticsearch.version>8.15.3</elasticsearch.version>
<elasticsearch.version>9.0.3</elasticsearch.version>
<commons.beanutils.version>1.9.4</commons.beanutils.version>
<commons.collections.version>3.2.2</commons.collections.version>
<zookeeper.version>3.9.2</zookeeper.version>
Expand Down
Loading