Compare commits
12 Commits
6.1.x
...
3.2.1.RELEASE
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e572679dd | |||
| de9c664d1e | |||
| 8187c5362a | |||
| a8eb260bbd | |||
| bb944f595f | |||
| 598626238b | |||
| a451f8dca4 | |||
| 4fd070c332 | |||
| 091413dd69 | |||
| ff74425132 | |||
| 6f4d1dcc57 | |||
| 9713e33fed |
Vendored
+4
-4
@@ -3,7 +3,7 @@ pipeline {
|
|||||||
|
|
||||||
triggers {
|
triggers {
|
||||||
pollSCM 'H/10 * * * *'
|
pollSCM 'H/10 * * * *'
|
||||||
upstream(upstreamProjects: "spring-data-commons/master", threshold: hudson.model.Result.SUCCESS)
|
upstream(upstreamProjects: "spring-data-commons/2.2.x", threshold: hudson.model.Result.SUCCESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
@@ -15,7 +15,7 @@ pipeline {
|
|||||||
stage("Test") {
|
stage("Test") {
|
||||||
when {
|
when {
|
||||||
anyOf {
|
anyOf {
|
||||||
branch 'master'
|
branch '3.2.x'
|
||||||
not { triggeredBy 'UpstreamCause' }
|
not { triggeredBy 'UpstreamCause' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ pipeline {
|
|||||||
stage('Release to artifactory') {
|
stage('Release to artifactory') {
|
||||||
when {
|
when {
|
||||||
anyOf {
|
anyOf {
|
||||||
branch 'master'
|
branch '3.2.x'
|
||||||
not { triggeredBy 'UpstreamCause' }
|
not { triggeredBy 'UpstreamCause' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Publish documentation') {
|
stage('Publish documentation') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch '3.2.x'
|
||||||
}
|
}
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
<artifactId>spring-data-elasticsearch</artifactId>
|
<artifactId>spring-data-elasticsearch</artifactId>
|
||||||
<version>3.2.0.RELEASE</version>
|
<version>3.2.1.RELEASE</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.data.build</groupId>
|
<groupId>org.springframework.data.build</groupId>
|
||||||
<artifactId>spring-data-parent</artifactId>
|
<artifactId>spring-data-parent</artifactId>
|
||||||
<version>2.2.0.RELEASE</version>
|
<version>2.2.1.RELEASE</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Spring Data Elasticsearch</name>
|
<name>Spring Data Elasticsearch</name>
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<commonslang>2.6</commonslang>
|
<commonslang>2.6</commonslang>
|
||||||
<elasticsearch>6.8.1</elasticsearch>
|
<elasticsearch>6.8.4</elasticsearch>
|
||||||
<log4j>2.9.1</log4j>
|
<log4j>2.9.1</log4j>
|
||||||
<springdata.commons>2.2.0.RELEASE</springdata.commons>
|
<springdata.commons>2.2.1.RELEASE</springdata.commons>
|
||||||
<netty>4.1.39.Final</netty>
|
<netty>4.1.39.Final</netty>
|
||||||
<java-module-name>spring.data.elasticsearch</java-module-name>
|
<java-module-name>spring.data.elasticsearch</java-module-name>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -267,14 +267,6 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.asciidoctor</groupId>
|
|
||||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<!--
|
<!--
|
||||||
please do not remove this configuration for surefire - we need that to avoid issue with jar hell
|
please do not remove this configuration for surefire - we need that to avoid issue with jar hell
|
||||||
-->
|
-->
|
||||||
@@ -292,6 +284,14 @@
|
|||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.asciidoctor</groupId>
|
||||||
|
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ The following table shows the Elasticsearch versions that are used by Spring Dat
|
|||||||
[cols="^,^,^,^",options="header"]
|
[cols="^,^,^,^",options="header"]
|
||||||
|===
|
|===
|
||||||
|Spring Data Release Train |Spring Data Elasticsearch |Elasticsearch | Spring Boot
|
|Spring Data Release Train |Spring Data Elasticsearch |Elasticsearch | Spring Boot
|
||||||
|Moorefootnote:cdv[Currently in development] |3.2.xfootnote:cdv[]|6.8.1 / 7.xfootnote:hrc[via the <<elasticsearch.clients.rest,high-level REST client>>]|2.2.0footnote:cdv[]
|
|Moore |3.2.x |6.8.4 |2.2.x
|
||||||
|Lovelace |3.1.x |6.2.2 / 7.xfootnote:hrc[]|2.1.x
|
|Lovelace |3.1.x |6.2.2|2.1.x
|
||||||
|Kayfootnote:oom[Out of maintenance]|3.0.xfootnote:oom[] |5.5.0 |2.0.xfootnote:oom[]
|
|Kayfootnote:oom[Out of maintenance]|3.0.xfootnote:oom[] |5.5.0 |2.0.xfootnote:oom[]
|
||||||
|Ingallsfootnote:oom[]|2.1.xfootnote:oom[] |2.4.0 |1.5.xfootnote:oom[]
|
|Ingallsfootnote:oom[]|2.1.xfootnote:oom[] |2.4.0 |1.5.xfootnote:oom[]
|
||||||
|===
|
|===
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.time.Duration;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.net.ssl.HostnameVerifier;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
@@ -30,6 +31,7 @@ import org.springframework.http.HttpHeaders;
|
|||||||
*
|
*
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
* @author Peter-Josef Meisch
|
* @author Peter-Josef Meisch
|
||||||
|
* @author Henrique Amaral
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
*/
|
*/
|
||||||
public interface ClientConfiguration {
|
public interface ClientConfiguration {
|
||||||
@@ -118,6 +120,13 @@ public interface ClientConfiguration {
|
|||||||
*/
|
*/
|
||||||
Optional<SSLContext> getSslContext();
|
Optional<SSLContext> getSslContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the {@link HostnameVerifier} to use. Can be {@link Optional#empty()} if unconfigured.
|
||||||
|
*
|
||||||
|
* @return the {@link HostnameVerifier} to use. Can be {@link Optional#empty()} if unconfigured.
|
||||||
|
*/
|
||||||
|
Optional<HostnameVerifier> getHostNameVerifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link java.time.Duration connect timeout}.
|
* Returns the {@link java.time.Duration connect timeout}.
|
||||||
*
|
*
|
||||||
@@ -201,6 +210,16 @@ public interface ClientConfiguration {
|
|||||||
* @return the {@link TerminalClientConfigurationBuilder}.
|
* @return the {@link TerminalClientConfigurationBuilder}.
|
||||||
*/
|
*/
|
||||||
TerminalClientConfigurationBuilder usingSsl(SSLContext sslContext);
|
TerminalClientConfigurationBuilder usingSsl(SSLContext sslContext);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect via {@literal https} using the givens {@link SSLContext} and HostnameVerifier {@link HostnameVerifier} .<br />
|
||||||
|
*
|
||||||
|
* <strong>NOTE</strong> You need to leave out the protocol in
|
||||||
|
* {@link ClientConfigurationBuilderWithRequiredEndpoint#connectedTo(String)}.
|
||||||
|
*
|
||||||
|
* @return the {@link TerminalClientConfigurationBuilder}.
|
||||||
|
*/
|
||||||
|
TerminalClientConfigurationBuilder usingSsl(SSLContext sslContext, HostnameVerifier hostnameVerifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+20
-1
@@ -22,6 +22,7 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.net.ssl.HostnameVerifier;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint;
|
import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint;
|
||||||
@@ -37,6 +38,7 @@ import org.springframework.util.Assert;
|
|||||||
* @author Christoph Strobl
|
* @author Christoph Strobl
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
* @author Peter-Josef Meisch
|
* @author Peter-Josef Meisch
|
||||||
|
* @author Henrique Amaral
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
*/
|
*/
|
||||||
class ClientConfigurationBuilder
|
class ClientConfigurationBuilder
|
||||||
@@ -46,6 +48,7 @@ class ClientConfigurationBuilder
|
|||||||
private HttpHeaders headers = HttpHeaders.EMPTY;
|
private HttpHeaders headers = HttpHeaders.EMPTY;
|
||||||
private boolean useSsl;
|
private boolean useSsl;
|
||||||
private @Nullable SSLContext sslContext;
|
private @Nullable SSLContext sslContext;
|
||||||
|
private @Nullable HostnameVerifier hostnameVerifier;
|
||||||
private Duration connectTimeout = Duration.ofSeconds(10);
|
private Duration connectTimeout = Duration.ofSeconds(10);
|
||||||
private Duration soTimeout = Duration.ofSeconds(5);
|
private Duration soTimeout = Duration.ofSeconds(5);
|
||||||
private String username;
|
private String username;
|
||||||
@@ -103,6 +106,22 @@ class ClientConfigurationBuilder
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.springframework.data.elasticsearch.client.ClientConfiguration.MaybeSecureClientConfigurationBuilder#usingSsl(javax.net.ssl.SSLContext, javax.net.ssl.HostnameVerifier)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TerminalClientConfigurationBuilder usingSsl(SSLContext sslContext, HostnameVerifier hostnameVerifier) {
|
||||||
|
|
||||||
|
Assert.notNull(sslContext, "SSL Context must not be null");
|
||||||
|
Assert.notNull(hostnameVerifier, "Host Name Verifier must not be null");
|
||||||
|
|
||||||
|
this.useSsl = true;
|
||||||
|
this.sslContext = sslContext;
|
||||||
|
this.hostnameVerifier = hostnameVerifier;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder#withDefaultHeaders(org.springframework.http.HttpHeaders)
|
* @see org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder#withDefaultHeaders(org.springframework.http.HttpHeaders)
|
||||||
@@ -171,7 +190,7 @@ class ClientConfigurationBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new DefaultClientConfiguration(this.hosts, this.headers, this.useSsl, this.sslContext, this.soTimeout,
|
return new DefaultClientConfiguration(this.hosts, this.headers, this.useSsl, this.sslContext, this.soTimeout,
|
||||||
this.connectTimeout);
|
this.connectTimeout, this.hostnameVerifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static InetSocketAddress parse(String hostAndPort) {
|
private static InetSocketAddress parse(String hostAndPort) {
|
||||||
|
|||||||
+13
-1
@@ -22,6 +22,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.net.ssl.HostnameVerifier;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
@@ -42,9 +43,10 @@ class DefaultClientConfiguration implements ClientConfiguration {
|
|||||||
private final @Nullable SSLContext sslContext;
|
private final @Nullable SSLContext sslContext;
|
||||||
private final Duration soTimeout;
|
private final Duration soTimeout;
|
||||||
private final Duration connectTimeout;
|
private final Duration connectTimeout;
|
||||||
|
private final @Nullable HostnameVerifier hostnameVerifier;
|
||||||
|
|
||||||
DefaultClientConfiguration(List<InetSocketAddress> hosts, HttpHeaders headers, boolean useSsl,
|
DefaultClientConfiguration(List<InetSocketAddress> hosts, HttpHeaders headers, boolean useSsl,
|
||||||
@Nullable SSLContext sslContext, Duration soTimeout, Duration connectTimeout) {
|
@Nullable SSLContext sslContext, Duration soTimeout, Duration connectTimeout, @Nullable HostnameVerifier hostnameVerifier) {
|
||||||
|
|
||||||
this.hosts = Collections.unmodifiableList(new ArrayList<>(hosts));
|
this.hosts = Collections.unmodifiableList(new ArrayList<>(hosts));
|
||||||
this.headers = new HttpHeaders(headers);
|
this.headers = new HttpHeaders(headers);
|
||||||
@@ -52,6 +54,7 @@ class DefaultClientConfiguration implements ClientConfiguration {
|
|||||||
this.sslContext = sslContext;
|
this.sslContext = sslContext;
|
||||||
this.soTimeout = soTimeout;
|
this.soTimeout = soTimeout;
|
||||||
this.connectTimeout = connectTimeout;
|
this.connectTimeout = connectTimeout;
|
||||||
|
this.hostnameVerifier = hostnameVerifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -90,6 +93,15 @@ class DefaultClientConfiguration implements ClientConfiguration {
|
|||||||
return Optional.ofNullable(this.sslContext);
|
return Optional.ofNullable(this.sslContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.springframework.data.elasticsearch.client.ClientConfiguration#getHostNameVerifier()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Optional<HostnameVerifier> getHostNameVerifier() {
|
||||||
|
return Optional.ofNullable(this.hostnameVerifier);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.elasticsearch.client.ClientConfiguration#getConnectTimeout()
|
* @see org.springframework.data.elasticsearch.client.ClientConfiguration#getConnectTimeout()
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import java.util.List;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.net.ssl.HostnameVerifier;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
@@ -52,6 +53,7 @@ import org.springframework.util.Assert;
|
|||||||
*
|
*
|
||||||
* @author Christoph Strobl
|
* @author Christoph Strobl
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
|
* @author Henrique Amaral
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
*/
|
*/
|
||||||
public final class RestClients {
|
public final class RestClients {
|
||||||
@@ -87,7 +89,9 @@ public final class RestClients {
|
|||||||
builder.setHttpClientConfigCallback(clientBuilder -> {
|
builder.setHttpClientConfigCallback(clientBuilder -> {
|
||||||
|
|
||||||
Optional<SSLContext> sslContext = clientConfiguration.getSslContext();
|
Optional<SSLContext> sslContext = clientConfiguration.getSslContext();
|
||||||
|
Optional<HostnameVerifier> hostNameVerifier = clientConfiguration.getHostNameVerifier();
|
||||||
sslContext.ifPresent(clientBuilder::setSSLContext);
|
sslContext.ifPresent(clientBuilder::setSSLContext);
|
||||||
|
hostNameVerifier.ifPresent(clientBuilder::setSSLHostnameVerifier);
|
||||||
|
|
||||||
if (ClientLogger.isEnabled()) {
|
if (ClientLogger.isEnabled()) {
|
||||||
|
|
||||||
|
|||||||
+4
@@ -960,6 +960,10 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate
|
|||||||
prepareSort(query, searchSourceBuilder, entity);
|
prepareSort(query, searchSourceBuilder, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.getIndicesOptions() != null) {
|
||||||
|
request.indicesOptions(query.getIndicesOptions());
|
||||||
|
}
|
||||||
|
|
||||||
if (query instanceof SearchQuery) {
|
if (query instanceof SearchQuery) {
|
||||||
SearchQuery searchQuery = (SearchQuery) query;
|
SearchQuery searchQuery = (SearchQuery) query;
|
||||||
|
|
||||||
|
|||||||
@@ -810,6 +810,10 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate
|
|||||||
prepareSort(query, requestBuilder, entity);
|
prepareSort(query, requestBuilder, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.getIndicesOptions() != null) {
|
||||||
|
requestBuilder.setIndicesOptions(query.getIndicesOptions());
|
||||||
|
}
|
||||||
|
|
||||||
if (query instanceof SearchQuery) {
|
if (query instanceof SearchQuery) {
|
||||||
SearchQuery searchQuery = (SearchQuery) query;
|
SearchQuery searchQuery = (SearchQuery) query;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
Spring Data Elasticsearch Changelog
|
Spring Data Elasticsearch Changelog
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
Changes in version 3.2.1.RELEASE (2019-11-04)
|
||||||
|
---------------------------------------------
|
||||||
|
* DATAES-679 - Upgrade to Elasticsearch 6.8.4.
|
||||||
|
* DATAES-673 - Create a Ssl Rest Client using SslContext and HostnameVerifier.
|
||||||
|
* DATAES-671 - Missing indicesOptions support for scrolling queries.
|
||||||
|
* DATAES-670 - fix version compatibility matrix in documentation.
|
||||||
|
* DATAES-665 - Javadoc not deployed.
|
||||||
|
* DATAES-662 - Release 3.2.1 (Moore SR1).
|
||||||
|
|
||||||
|
|
||||||
|
Changes in version 3.1.12.RELEASE (2019-11-04)
|
||||||
|
----------------------------------------------
|
||||||
|
* DATAES-660 - Release 3.1.12 (Lovelace SR12).
|
||||||
|
|
||||||
|
|
||||||
Changes in version 3.2.0.RELEASE (2019-09-30)
|
Changes in version 3.2.0.RELEASE (2019-09-30)
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
* DATAES-657 - Sort by _score not supported by ElasticsearchRestTemplate.
|
* DATAES-657 - Sort by _score not supported by ElasticsearchRestTemplate.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Spring Data Elasticsearch 3.2 GA
|
Spring Data Elasticsearch 3.2.1
|
||||||
Copyright (c) [2013-2019] Pivotal Software, Inc.
|
Copyright (c) [2013-2019] Pivotal Software, Inc.
|
||||||
|
|
||||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||||
|
|||||||
+21
@@ -23,6 +23,7 @@ import java.time.Duration;
|
|||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
|
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ import org.springframework.http.HttpHeaders;
|
|||||||
*
|
*
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
* @author Peter-Josef Meisch
|
* @author Peter-Josef Meisch
|
||||||
|
* @author Henrique Amaral
|
||||||
*/
|
*/
|
||||||
public class ClientConfigurationUnitTests {
|
public class ClientConfigurationUnitTests {
|
||||||
|
|
||||||
@@ -117,6 +119,25 @@ public class ClientConfigurationUnitTests {
|
|||||||
assertThat(defaultHeaders.get(HttpHeaders.AUTHORIZATION)).isNull();
|
assertThat(defaultHeaders.get(HttpHeaders.AUTHORIZATION)).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test // DATAES-673
|
||||||
|
public void shouldCreateSslConfigurationWithHostnameVerifier() {
|
||||||
|
|
||||||
|
SSLContext sslContext = mock(SSLContext.class);
|
||||||
|
|
||||||
|
ClientConfiguration clientConfiguration = ClientConfiguration.builder() //
|
||||||
|
.connectedTo("foo", "bar") //
|
||||||
|
.usingSsl(sslContext, NoopHostnameVerifier.INSTANCE) //
|
||||||
|
.build();
|
||||||
|
|
||||||
|
assertThat(clientConfiguration.getEndpoints()).containsOnly(InetSocketAddress.createUnresolved("foo", 9200),
|
||||||
|
InetSocketAddress.createUnresolved("bar", 9200));
|
||||||
|
assertThat(clientConfiguration.useSsl()).isTrue();
|
||||||
|
assertThat(clientConfiguration.getSslContext()).contains(sslContext);
|
||||||
|
assertThat(clientConfiguration.getConnectTimeout()).isEqualTo(Duration.ofSeconds(10));
|
||||||
|
assertThat(clientConfiguration.getSocketTimeout()).isEqualTo(Duration.ofSeconds(5));
|
||||||
|
assertThat(clientConfiguration.getHostNameVerifier()).contains(NoopHostnameVerifier.INSTANCE);
|
||||||
|
}
|
||||||
|
|
||||||
private static String buildBasicAuth(String username, String password) {
|
private static String buildBasicAuth(String username, String password) {
|
||||||
|
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|||||||
+38
@@ -1709,6 +1709,44 @@ public class ElasticsearchTemplateTests {
|
|||||||
elasticsearchTemplate.clearScroll(scroll.getScrollId());
|
elasticsearchTemplate.clearScroll(scroll.getScrollId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test // DATAES-671
|
||||||
|
public void shouldPassIndicesOptionsForGivenSearchScrollQuery() {
|
||||||
|
|
||||||
|
// given
|
||||||
|
long scrollTimeInMillis = 3000;
|
||||||
|
String documentId = randomNumeric(5);
|
||||||
|
SampleEntity sampleEntity = SampleEntity.builder().id(documentId).message("some message")
|
||||||
|
.version(System.currentTimeMillis()).build();
|
||||||
|
|
||||||
|
IndexQuery idxQuery = new IndexQueryBuilder().withIndexName(INDEX_1_NAME).withId(sampleEntity.getId())
|
||||||
|
.withObject(sampleEntity).build();
|
||||||
|
|
||||||
|
elasticsearchTemplate.index(idxQuery);
|
||||||
|
elasticsearchTemplate.refresh(INDEX_1_NAME);
|
||||||
|
|
||||||
|
// when
|
||||||
|
SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(matchAllQuery())
|
||||||
|
.withIndices(INDEX_1_NAME, INDEX_2_NAME).withIndicesOptions(IndicesOptions.lenientExpandOpen()).build();
|
||||||
|
|
||||||
|
List<SampleEntity> entities = new ArrayList<>();
|
||||||
|
|
||||||
|
ScrolledPage<SampleEntity> scroll = elasticsearchTemplate.startScroll(scrollTimeInMillis, searchQuery,
|
||||||
|
SampleEntity.class, searchResultMapper);
|
||||||
|
|
||||||
|
entities.addAll(scroll.getContent());
|
||||||
|
|
||||||
|
while (scroll.hasContent()) {
|
||||||
|
scroll = elasticsearchTemplate.continueScroll(scroll.getScrollId(), scrollTimeInMillis, SampleEntity.class,
|
||||||
|
searchResultMapper);
|
||||||
|
|
||||||
|
entities.addAll(scroll.getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
// then
|
||||||
|
assertThat(entities).isNotNull();
|
||||||
|
assertThat(entities.size()).isGreaterThanOrEqualTo(1);
|
||||||
|
}
|
||||||
|
|
||||||
@Test // DATAES-479
|
@Test // DATAES-479
|
||||||
public void shouldHonorTheHighlightBuilderOptions() {
|
public void shouldHonorTheHighlightBuilderOptions() {
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
+2
-2
@@ -20,7 +20,7 @@
|
|||||||
description=Adds "built in" analyzers to Elasticsearch.
|
description=Adds "built in" analyzers to Elasticsearch.
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=analysis-common
|
name=analysis-common
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.analysis.common.CommonAnalysisPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -20,7 +20,7 @@
|
|||||||
description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources
|
description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=ingest-common
|
name=ingest-common
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.ingest.common.IngestCommonPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+2
-2
@@ -20,7 +20,7 @@
|
|||||||
description=Lucene expressions integration for Elasticsearch
|
description=Lucene expressions integration for Elasticsearch
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=lang-expression
|
name=lang-expression
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.script.expression.ExpressionPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -20,7 +20,7 @@
|
|||||||
description=An easy, safe and fast scripting language for Elasticsearch
|
description=An easy, safe and fast scripting language for Elasticsearch
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=lang-painless
|
name=lang-painless
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.painless.PainlessPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -20,7 +20,7 @@
|
|||||||
description=Adds advanced field mappers
|
description=Adds advanced field mappers
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=mapper-extras
|
name=mapper-extras
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.index.mapper.MapperExtrasPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
description=The Reindex module adds APIs to reindex from one index to another or update documents in place.
|
description=The Reindex module adds APIs to reindex from one index to another or update documents in place.
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=reindex
|
name=reindex
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.index.reindex.ReindexPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@
|
|||||||
description=Module for URL repository
|
description=Module for URL repository
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=6.8.1
|
version=6.8.4
|
||||||
#
|
#
|
||||||
# 'name': the plugin name
|
# 'name': the plugin name
|
||||||
name=repository-url
|
name=repository-url
|
||||||
@@ -35,7 +35,7 @@ classname=org.elasticsearch.plugin.repository.url.URLRepositoryPlugin
|
|||||||
java.version=1.8
|
java.version=1.8
|
||||||
#
|
#
|
||||||
# 'elasticsearch.version': version of elasticsearch compiled against
|
# 'elasticsearch.version': version of elasticsearch compiled against
|
||||||
elasticsearch.version=6.8.1
|
elasticsearch.version=6.8.4
|
||||||
### optional elements for plugins:
|
### optional elements for plugins:
|
||||||
#
|
#
|
||||||
# 'extended.plugins': other plugins this plugin extends through SPI
|
# 'extended.plugins': other plugins this plugin extends through SPI
|
||||||
|
|||||||
Reference in New Issue
Block a user