diff --git a/CHANGELOG.md b/CHANGELOG.md index e60e544dff..0d585d0f3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file based on the * Reintroduce `http`. #237 * Add `user.full_name` field. #201 * Add `network.community_id` field. #208 +* Add fields `geo.country_name` and `geo.region_iso_code`. #214 ### Improvements * Improved the definition of the file fields #196 diff --git a/README.md b/README.md index 5e39e32de5..ba606a9e11 100644 --- a/README.md +++ b/README.md @@ -245,11 +245,13 @@ Note also that the `geo` fields are not expected to be used directly at the top | Field | Description | Level | Type | Example | |---|---|---|---|---| -| geo.continent_name | Name of the continent. | core | keyword | `North America` | -| geo.country_iso_code | Country ISO code. | core | keyword | `CA` | | geo.location | Longitude and latitude. | core | geo_point | `{ "lon": -73.614830, "lat": 45.505918 }` | +| geo.continent_name | Name of the continent. | core | keyword | `North America` | +| geo.country_name | Country name. | core | keyword | `Canada` | | geo.region_name | Region name. | core | keyword | `Quebec` | | geo.city_name | City name. | core | keyword | `Montreal` | +| geo.country_iso_code | Country ISO code. | core | keyword | `CA` | +| geo.region_iso_code | Region ISO code. | core | keyword | `CA-QC` | ## Group fields diff --git a/fields.yml b/fields.yml index 19ea32d062..dfbcaddab8 100644 --- a/fields.yml +++ b/fields.yml @@ -624,6 +624,13 @@ type: group fields: + - name: location + level: core + type: geo_point + description: > + Longitude and latitude. + example: '{ "lon": -73.614830, "lat": 45.505918 }' + - name: continent_name level: core type: keyword @@ -631,19 +638,12 @@ Name of the continent. example: North America - - name: country_iso_code + - name: country_name level: core type: keyword description: > - Country ISO code. - example: CA - - - name: location - level: core - type: geo_point - description: > - Longitude and latitude. - example: '{ "lon": -73.614830, "lat": 45.505918 }' + Country name. + example: Canada - name: region_name level: core @@ -659,6 +659,20 @@ City name. example: Montreal + - name: country_iso_code + level: core + type: keyword + description: > + Country ISO code. + example: CA + + - name: region_iso_code + level: core + type: keyword + description: > + Region ISO code. + example: CA-QC + - name: group title: Group group: 2 diff --git a/schema.csv b/schema.csv index 0cc4b03981..0dbf56413e 100644 --- a/schema.csv +++ b/schema.csv @@ -68,7 +68,9 @@ file.uid,keyword,extended, geo.city_name,keyword,core,Montreal geo.continent_name,keyword,core,North America geo.country_iso_code,keyword,core,CA +geo.country_name,keyword,core,Canada geo.location,geo_point,core,"{ ""lon"": -73.614830, ""lat"": 45.505918 }" +geo.region_iso_code,keyword,core,CA-QC geo.region_name,keyword,core,Quebec group.id,keyword,extended, group.name,keyword,extended, diff --git a/schemas/geo.yml b/schemas/geo.yml index 06d87bc989..55ba939d0f 100644 --- a/schemas/geo.yml +++ b/schemas/geo.yml @@ -15,6 +15,13 @@ type: group fields: + - name: location + level: core + type: geo_point + description: > + Longitude and latitude. + example: '{ "lon": -73.614830, "lat": 45.505918 }' + - name: continent_name level: core type: keyword @@ -22,19 +29,12 @@ Name of the continent. example: North America - - name: country_iso_code + - name: country_name level: core type: keyword description: > - Country ISO code. - example: CA - - - name: location - level: core - type: geo_point - description: > - Longitude and latitude. - example: '{ "lon": -73.614830, "lat": 45.505918 }' + Country name. + example: Canada - name: region_name level: core @@ -49,3 +49,17 @@ description: > City name. example: Montreal + + - name: country_iso_code + level: core + type: keyword + description: > + Country ISO code. + example: CA + + - name: region_iso_code + level: core + type: keyword + description: > + Region ISO code. + example: CA-QC diff --git a/template.json b/template.json index a8f917b7d9..ed0bef8337 100644 --- a/template.json +++ b/template.json @@ -325,9 +325,17 @@ "ignore_above": 1024, "type": "keyword" }, + "country_name": { + "ignore_above": 1024, + "type": "keyword" + }, "location": { "type": "geo_point" }, + "region_iso_code": { + "ignore_above": 1024, + "type": "keyword" + }, "region_name": { "ignore_above": 1024, "type": "keyword"