Skip to content

Commit f1bd843

Browse files
authored
Merge pull request #65 from codelibs/revert-62-master
Revert "Add support for a new output format : GeoJSON (#62)"
2 parents cdbfadd + 6200f1c commit f1bd843

File tree

7 files changed

+8
-558
lines changed

7 files changed

+8
-558
lines changed

README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elasticsearch Data Format Plugin
44
## Overview
55

66
Elasticsearch Data Format Plugin provides a feature to allow you to download a response of a search result as several formats other than JSON.
7-
The supported formats are CSV, Excel, JSON(Bulk), JSON(Object List) and GeoJSON.
7+
The supported formats are CSV, Excel, JSON(Bulk) and JSON(Object List).
88

99
## Version
1010

@@ -32,7 +32,7 @@ If you want to download all data, use `scroll=1m` query parameter.
3232
| Request Parameter | Type | Description |
3333
|:------------------|:-------:|:------------|
3434
| append.header | boolean | Append column headers if true |
35-
| fields_name | string | choose the fields to dump (comma separate format) |
35+
| fields_name | string | choose the fields to dump |
3636
| source | string | [Query DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html) |
3737
| csv.separator | string | Separate character in CSV |
3838
| csv.quote | string | Quote character in CSV|
@@ -47,7 +47,7 @@ If you want to download all data, use `scroll=1m` query parameter.
4747
| Request Parameter | Type | Description |
4848
|:------------------|:-------:|:------------|
4949
| append.header | boolean | Append column headers if true |
50-
| fields_name | string | choose the fields to dump (comma separate format) |
50+
| fields_name | string | choose the fields to dump |
5151
| source | string | [Query DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html) |
5252

5353
### Excel 2007
@@ -56,8 +56,6 @@ If you want to download all data, use `scroll=1m` query parameter.
5656

5757
| Request Parameter | Type | Description |
5858
|:------------------|:-------:|:------------|
59-
| append.header | boolean | Append column headers if true |
60-
| fields_name | string | choose the fields to dump (comma separate format) |
6159
| source | string | [Query DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html) |
6260

6361
### JSON (Elasticsearch Bulk format)
@@ -78,19 +76,3 @@ If you want to download all data, use `scroll=1m` query parameter.
7876
| :---------------- | :----: | :----------------------------------------------------------- |
7977
| source | string | [Query DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html) |
8078

81-
### GeoJSON (Open GIS standard)
82-
83-
$ curl -o /tmp/data.json -XGET "localhost:9200/{index}/{type}/_data?format=geojson&source=..."
84-
85-
| Request Parameter | Type | Description |
86-
| :----------------------- | :----: | :----------------------------------------------------------- |
87-
| source | string | [Query DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html) |
88-
| geometry.lon_field | string | Longitude field for coordinates (Support Geometry type "Point") |
89-
| geometry.lat_field | string | Latitude field for coordinates (Support Geometry type "Point") |
90-
| geometry.alt_field | string | Altitude field for coordinates (Support Geometry type "Point") |
91-
| geometry.coord_field | string | Coordinates field. Support all Geometry types (see [GeoJSON Example](https://en.wikipedia.org/wiki/GeoJSON)).<br/>If set, overwrite `geometry.lon_field`, `geometry.lat_field` and `geometry.alt_field` |
92-
| geometry.type_field | string | Geometry type field (see [GeoJSON Example](https://en.wikipedia.org/wiki/GeoJSON))<br/>Only used if `geometry.coord_field` param is set |
93-
| keep_geometry_info | boolean | Keep or not the original geometry fields in final GeoJSON properties (default: false) |
94-
| exclude_fields | string | Exclude fields in final geojson properties (comma separate format) |
95-
96-
**NB**: Field name can use basic style like `a` or JSONpath style like `a.b.c[2].d`

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@
131131
<artifactId>poi-ooxml-schemas</artifactId>
132132
<version>${poi.version}</version>
133133
</dependency>
134-
<dependency>
135-
<groupId>com.google.code.gson</groupId>
136-
<artifactId>gson</artifactId>
137-
<version>2.8.6</version>
138-
</dependency>
139134
<dependency>
140135
<groupId>org.codelibs</groupId>
141136
<artifactId>elasticsearch-cluster-runner</artifactId>

src/main/java/org/codelibs/elasticsearch/df/content/ContentType.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.codelibs.elasticsearch.df.content;
22

33
import org.codelibs.elasticsearch.df.content.csv.CsvContent;
4-
import org.codelibs.elasticsearch.df.content.geojson.GeoJsonContent;
54
import org.codelibs.elasticsearch.df.content.json.JsonContent;
65
import org.codelibs.elasticsearch.df.content.json.JsonListContent;
76
import org.codelibs.elasticsearch.df.content.xls.XlsContent;
@@ -118,27 +117,6 @@ public String fileName(final RestRequest request) {
118117
}
119118
return index + ".json";
120119
}
121-
},
122-
GEOJSON(60) {
123-
@Override
124-
public String contentType() {
125-
return "application/geo+json";
126-
}
127-
128-
@Override
129-
public DataContent dataContent(final Client client,
130-
final RestRequest request) {
131-
return new GeoJsonContent(client, request, this);
132-
}
133-
134-
@Override
135-
public String fileName(final RestRequest request) {
136-
final String index = request.param("index");
137-
if (index == null) {
138-
return "_all.geojson";
139-
}
140-
return index + ".geojson";
141-
}
142120
};
143121

144122
private int index;

src/main/java/org/codelibs/elasticsearch/df/content/geojson/GeoJsonContent.java

Lines changed: 0 additions & 240 deletions
This file was deleted.

src/main/java/org/codelibs/elasticsearch/df/rest/RestDataAction.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ private ContentType getContentType(final RestRequest request) {
132132
} else if ("application/list+json".equals(contentType)
133133
|| "jsonlist".equals(contentType)) {
134134
return ContentType.JSONLIST;
135-
} else if ("application/geo+json".equals(contentType)
136-
|| "application/geojson".equals(contentType)
137-
|| "geojson".equals(contentType)) {
138-
return ContentType.GEOJSON;
139135
}
140136

141137
return null;

0 commit comments

Comments
 (0)