Skip to content

Commit

Permalink
Prepare release 7.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
5k4nd committed Feb 13, 2020
1 parent 9229f34 commit bc19dbf
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 22 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is an `Ingest`, `Search` and `Script` plugin.

## Installation

`bin/plugin --install geoshape-plugin --url https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.5.1.0/elasticsearch-plugin-geoshape-7.5.1.0.zip"`
`bin/plugin --install geoshape-plugin --url https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.6.0.0/elasticsearch-plugin-geoshape-7.6.0.0.zip"`



Expand Down Expand Up @@ -350,7 +350,7 @@ Plugin versions are available for (at least) all minor versions of Elasticsearch
The first 3 digits of plugin version is Elasticsearch versioning. The last digit is used for plugin versioning under an elasticsearch version.

To install it, launch this command in Elasticsearch directory replacing the url by the correct link for your Elasticsearch version (see table)
`bin/plugin --install geoshape-plugin --url "https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.5.1.0/elasticsearch-plugin-geoshape-7.5.1.0.zip"`
`bin/plugin --install geoshape-plugin --url "https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.6.0.0/elasticsearch-plugin-geoshape-7.6.0.0.zip"`

| elasticsearch version | plugin version | plugin url |
| --------------------- | -------------- | ---------- |
Expand All @@ -367,6 +367,7 @@ To install it, launch this command in Elasticsearch directory replacing the url
| 7.3.2 | 7.3.2.0 | https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.3.2.0/elasticsearch-plugin-geoshape-7.3.2.0.zip |
| 7.4.0 | 7.4.0.0 | https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.4.0.0/elasticsearch-plugin-geoshape-7.4.0.0.zip |
| 7.5.1 | 7.5.1.0 | https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.5.1.0/elasticsearch-plugin-geoshape-7.5.1.0.zip |
| 7.6.0 | 7.6.0.0 | https://github.com/opendatasoft/elasticsearch-plugin-geoshape/releases/download/v7.6.0.0/elasticsearch-plugin-geoshape-7.6.0.0.zip |


## License
Expand Down
10 changes: 0 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Fixes integTests for 7.5.1 => https://github.com/elastic/elasticsearch/issues/49787#issuecomment-562720655
import org.elasticsearch.gradle.testclusters.TestClustersRegistry
import org.elasticsearch.gradle.testclusters.TestClustersPlugin

buildscript {
repositories {
mavenLocal()
Expand Down Expand Up @@ -57,9 +53,3 @@ checkstyleTest.enabled = true
dependencyLicenses.enabled = false

thirdPartyAudit.enabled = true

// Fixes integTests for 7.5.1 => https://github.com/elastic/elasticsearch/issues/49787#issuecomment-562720655
TestClustersRegistry registry = project.rootProject.extensions.create("testClustersRegistry", TestClustersRegistry)
TestClustersPlugin.configureClaimClustersHook(project.gradle, registry)
TestClustersPlugin.configureStartClustersHook(project.gradle, registry)
TestClustersPlugin.configureStopClustersHook(project.gradle, registry)
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elastic_version = 7.5.1
plugin_version = 7.5.1.0
elastic_version = 7.6.0
plugin_version = 7.6.0.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Jan 16 14:57:45 CET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.index.fielddata.ScriptDocValues;
import org.elasticsearch.script.FieldScript;
import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.script.ScriptEngine;
import org.elasticsearch.script.ScriptException;
import org.elasticsearch.script.FieldScript;
import org.elasticsearch.search.lookup.SearchLookup;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
Expand All @@ -23,11 +23,14 @@
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;

import static org.opendatasoft.elasticsearch.search.aggregations.bucket.geoshape.GeoShape.Algorithm.TOPOLOGY_PRESERVING;


public class ScriptGeoSimplify implements ScriptEngine {
public static final ScriptContext<GeoSearchLeafFactory> CONTEXT = new ScriptContext<>("geo_simplify", GeoSearchLeafFactory.class);

@Override
public String getType() {
return "geo_extension_scripts";
Expand All @@ -48,6 +51,11 @@ public <T> T compile(String scriptName, String scriptSource,
throw new IllegalArgumentException("Unknown script name " + scriptSource);
}

@Override
public Set<ScriptContext<?>> getSupportedContexts() {
return Collections.singleton(CONTEXT);
}

@Override
public void close() {
// optionally close resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import org.elasticsearch.search.aggregations.AggregatorFactories.Builder;
import org.elasticsearch.search.aggregations.AggregatorFactory;
import org.elasticsearch.search.aggregations.bucket.MultiBucketAggregationBuilder;
import org.elasticsearch.search.aggregations.support.CoreValuesSourceType;
import org.elasticsearch.search.aggregations.support.ValuesSource;
import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder;
import org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory;
import org.elasticsearch.search.aggregations.support.ValuesSourceConfig;
import org.elasticsearch.search.aggregations.support.ValuesSourceParserHelper;
import org.elasticsearch.search.aggregations.support.ValuesSourceType;
import org.elasticsearch.search.aggregations.support.ValueType;

import java.io.IOException;
Expand Down Expand Up @@ -100,15 +100,15 @@ static List<Object> parseSimplifyParam(XContentParser parser) throws IOException


private GeoShapeBuilder(String name, ValueType valueType) {
super(name, ValuesSourceType.ANY, valueType);
super(name, CoreValuesSourceType.ANY, valueType);
}

/**
* Read from a stream
*
*/
public GeoShapeBuilder(StreamInput in) throws IOException {
super(in, ValuesSourceType.ANY);
super(in, CoreValuesSourceType.ANY);
bucketCountThresholds = new GeoShapeAggregator.BucketCountThresholds(in);
must_simplify = in.readBoolean();
output_format = InternalGeoShape.OutputFormat.valueOf(in.readString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public List<InternalBucket> getBuckets() {
* Reduces the given aggregations to a single one and returns it.
*/
@Override
public InternalGeoShape doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
public InternalGeoShape reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
LongObjectPagedHashMap<List<InternalBucket>> buckets = null;

for (InternalAggregation aggregation : aggregations) {
Expand Down

0 comments on commit bc19dbf

Please sign in to comment.