Skip to content

Commit

Permalink
es 8.17.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-yuan committed Feb 4, 2025
1 parent c1e86b4 commit 6578dc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jdk:

before_install:
- sudo rm -rf /var/lib/elasticsearch
- curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.16.3-amd64.deb -o elasticsearch.deb && sudo dpkg -i --force-confnew elasticsearch.deb
- curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.17.0-amd64.deb -o elasticsearch.deb && sudo dpkg -i --force-confnew elasticsearch.deb
- sudo cp ./src/test/resources/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml
- sudo cat /etc/elasticsearch/elasticsearch.yml
- sudo java -version
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.nlpcn</groupId>
<artifactId>elasticsearch-sql</artifactId>
<version>8.16.3.0</version>
<version>8.17.0.0</version>
<packaging>jar</packaging>
<description>Query elasticsearch using SQL</description>
<name>elasticsearch-sql</name>
Expand Down Expand Up @@ -44,7 +44,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<runSuite>**/MainTestSuite.class</runSuite>
<elasticsearch.plugin.name>sql</elasticsearch.plugin.name>
<elasticsearch.version>8.16.3</elasticsearch.version>
<elasticsearch.version>8.17.0</elasticsearch.version>
<elasticsearch.plugin.classname>org.elasticsearch.plugin.nlpcn.SqlPlug</elasticsearch.plugin.classname>
<druid.version>1.2.15</druid.version>
<guava.version>32.0.0-jre</guava.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.search.aggregations.ParsedAggregation;
import org.elasticsearch.search.aggregations.metrics.InternalGeoCentroid.Fields;
import org.elasticsearch.xcontent.ObjectParser;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;

Expand Down Expand Up @@ -74,6 +74,11 @@ public XContentBuilder doXContentBody(XContentBuilder builder, Params params) th
GEO_POINT_PARSER.declareDouble(GeoPoint::resetLon, Fields.CENTROID_LON);
}

static class Fields {
static final ParseField CENTROID_LAT = new ParseField("lat");
static final ParseField CENTROID_LON = new ParseField("lon");
}

public static ParsedGeoCentroid fromXContent(XContentParser parser, final String name) {
ParsedGeoCentroid geoCentroid = PARSER.apply(parser, null);
geoCentroid.setName(name);
Expand Down

0 comments on commit 6578dc8

Please sign in to comment.