DATAES-373 - bump elasticsearch version to 5.5.0

This commit is contained in:
Artur Konczak 2017-07-21 15:34:39 +01:00
parent ffdc573caf
commit 8dfee0a437
8 changed files with 13 additions and 16 deletions

View File

@ -19,7 +19,7 @@
<properties>
<commonscollections>3.2.1</commonscollections>
<commonslang>2.6</commonslang>
<elasticsearch>5.4.0</elasticsearch>
<elasticsearch>5.5.0</elasticsearch>
<springdata.commons>2.0.0.BUILD-SNAPSHOT</springdata.commons>
</properties>
@ -91,7 +91,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.2</version>
<version>2.8.2</version>
</dependency>
<!-- Jackson JSON Mapper -->

View File

@ -41,6 +41,8 @@ import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.core.aggregation.AggregatedPage;
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
import org.springframework.data.elasticsearch.entities.Car;
import static java.util.Arrays.asList;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
@ -72,12 +74,7 @@ public class DefaultResultMapperTests {
when(searchHits.iterator()).thenReturn(new ArrayIterator(hits));
when(response.getHits()).thenReturn(searchHits);
Aggregation aggregationToReturn = createCarAggregation();
Aggregations aggregations = mock(Aggregations.class);
Iterator<Aggregation> iter = Collections.singletonList(aggregationToReturn).iterator();
when(aggregations.iterator()).thenReturn(iter).thenReturn(iter);
when(aggregations.get("engine")).thenReturn(aggregationToReturn);
Aggregations aggregations = new Aggregations(asList(createCarAggregation()));
when(response.getAggregations()).thenReturn(aggregations);
//When
@ -86,7 +83,7 @@ public class DefaultResultMapperTests {
//Then
page.hasFacets();
assertThat(page.hasAggregations(), is(true));
assertThat(page.getAggregation("engine").getName(), is("Diesel"));
assertThat(page.getAggregation("Diesel").getName(), is("Diesel"));
}
@Test
@ -185,8 +182,8 @@ public class DefaultResultMapperTests {
private Map<String, SearchHitField> createCarFields(String name, String model) {
Map<String, SearchHitField> result = new HashMap<>();
result.put("name", new SearchHitField("name", Arrays.asList(name)));
result.put("model", new SearchHitField("model", Arrays.asList(model)));
result.put("name", new SearchHitField("name", asList(name)));
result.put("model", new SearchHitField("model", asList(model)));
return result;
}

View File

@ -16,7 +16,7 @@
package org.springframework.data.elasticsearch.core;
import static org.elasticsearch.common.xcontent.XContentFactory.*;
import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.join.query.JoinQueryBuilders.hasChildQuery;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;

View File

@ -22,7 +22,7 @@
description=Lucene expressions integration for Elasticsearch
#
# 'version': plugin's version
version=5.4.0
version=5.5.0
#
# 'name': the plugin name
name=lang-expression
@ -37,7 +37,7 @@ classname=org.elasticsearch.script.expression.ExpressionPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=5.4.0
elasticsearch.version=5.5.0
### optional elements for plugins:
#
# 'has.native.controller': whether or not the plugin has a native controller

View File

@ -22,7 +22,7 @@
description=Groovy scripting integration for Elasticsearch
#
# 'version': plugin's version
version=5.4.0
version=5.5.0
#
# 'name': the plugin name
name=lang-groovy
@ -37,7 +37,7 @@ classname=org.elasticsearch.script.groovy.GroovyPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=5.4.0
elasticsearch.version=5.5.0
### optional elements for plugins:
#
# 'has.native.controller': whether or not the plugin has a native controller