├── NOTICE
├── src
├── test
│ ├── resources
│ │ └── ip2geo
│ │ │ ├── sample_invalid_less_than_two_fields.csv
│ │ │ ├── sample_valid.csv
│ │ │ ├── sample_valid.zip
│ │ │ ├── server
│ │ │ ├── city
│ │ │ │ ├── city.zip
│ │ │ │ ├── manifest_local.json
│ │ │ │ └── manifest.json
│ │ │ └── country
│ │ │ │ ├── country.zip
│ │ │ │ ├── manifest_local.json
│ │ │ │ └── manifest.json
│ │ │ ├── manifest_template.json
│ │ │ ├── manifest.json
│ │ │ ├── another_manifest.json
│ │ │ └── manifest_invalid_url.json
│ └── java
│ │ └── org
│ │ └── opensearch
│ │ └── geospatial
│ │ ├── shared
│ │ └── URLBuilderTests.java
│ │ ├── plugin
│ │ └── GeospatialPluginIT.java
│ │ ├── TestGeospatialPlugin.java
│ │ ├── ip2geo
│ │ ├── common
│ │ │ ├── DatasourceManifestTests.java
│ │ │ └── Ip2GeoSettingsTests.java
│ │ ├── action
│ │ │ ├── IpEnrichmentTransportActionTests.java
│ │ │ ├── RestDeleteDatasourceHandlerTests.java
│ │ │ ├── GetDatasourceRequestTests.java
│ │ │ └── DeleteDatasourceRequestTests.java
│ │ └── jobscheduler
│ │ │ └── DatasourceExtensionTests.java
│ │ ├── stats
│ │ └── upload
│ │ │ ├── UploadStatsBuilder.java
│ │ │ ├── UploadStatsNodeResponseTests.java
│ │ │ ├── UploadStatsNodeResponseBuilder.java
│ │ │ └── RestUploadStatsActionIT.java
│ │ ├── exceptions
│ │ ├── ResourceInUseExceptionTests.java
│ │ ├── ConcurrentModificationExceptionTests.java
│ │ └── IncompatibleDatasourceExceptionTests.java
│ │ ├── action
│ │ └── upload
│ │ │ └── geojson
│ │ │ ├── UploadGeoJSONRequestTests.java
│ │ │ └── UploadGeoJSONResponseTests.java
│ │ ├── index
│ │ ├── query
│ │ │ └── xypoint
│ │ │ │ └── XYPointQueryIT.java
│ │ └── mapper
│ │ │ └── xypoint
│ │ │ └── XYPointIndexerTests.java
│ │ └── geojson
│ │ └── FeatureCollectionTests.java
├── main
│ ├── resources
│ │ ├── plugin-additional-permissions.yml
│ │ ├── mappings
│ │ │ └── ip2geo_geoip.json
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── org.opensearch.jobscheduler.spi.JobSchedulerExtension
│ ├── java
│ │ └── org
│ │ │ └── opensearch
│ │ │ └── geospatial
│ │ │ ├── annotation
│ │ │ └── VisibleForTesting.java
│ │ │ ├── ip2geo
│ │ │ ├── jobscheduler
│ │ │ │ ├── DatasourceTask.java
│ │ │ │ └── DatasourceExtension.java
│ │ │ ├── action
│ │ │ │ ├── GetDatasourceAction.java
│ │ │ │ ├── PutDatasourceAction.java
│ │ │ │ ├── DeleteDatasourceAction.java
│ │ │ │ ├── UpdateDatasourceAction.java
│ │ │ │ ├── RestGetDatasourceHandler.java
│ │ │ │ ├── RestDeleteDatasourceHandler.java
│ │ │ │ ├── DeleteDatasourceRequest.java
│ │ │ │ ├── GetDatasourceRequest.java
│ │ │ │ └── RestUpdateDatasourceHandler.java
│ │ │ ├── common
│ │ │ │ ├── DatasourceState.java
│ │ │ │ ├── Ip2GeoExecutor.java
│ │ │ │ ├── HttpRedirectValidator.java
│ │ │ │ ├── ParameterValidator.java
│ │ │ │ └── URLDenyListChecker.java
│ │ │ └── dao
│ │ │ │ └── Ip2GeoProcessorDao.java
│ │ │ ├── shared
│ │ │ ├── Constants.java
│ │ │ ├── URLBuilder.java
│ │ │ └── PluginClient.java
│ │ │ ├── stats
│ │ │ └── upload
│ │ │ │ ├── UploadStatsAction.java
│ │ │ │ ├── UploadStatsRequest.java
│ │ │ │ ├── UploadStatsNodeRequest.java
│ │ │ │ ├── RestUploadStatsAction.java
│ │ │ │ ├── UploadStatsNodeResponse.java
│ │ │ │ ├── UploadStatsTransportAction.java
│ │ │ │ ├── UploadStatsResponse.java
│ │ │ │ └── TotalUploadStats.java
│ │ │ ├── index
│ │ │ ├── mapper
│ │ │ │ ├── xyshape
│ │ │ │ │ ├── XYShapeFieldTypeParser.java
│ │ │ │ │ ├── XYShapeQueryable.java
│ │ │ │ │ └── XYShapeIndexer.java
│ │ │ │ └── xypoint
│ │ │ │ │ └── XYPointFieldTypeParser.java
│ │ │ └── query
│ │ │ │ └── xypoint
│ │ │ │ └── XYPointQueryProcessor.java
│ │ │ ├── constants
│ │ │ └── IndexSetting.java
│ │ │ ├── action
│ │ │ └── upload
│ │ │ │ └── geojson
│ │ │ │ ├── UploadGeoJSONAction.java
│ │ │ │ └── UploadGeoJSONRequest.java
│ │ │ ├── search
│ │ │ └── aggregations
│ │ │ │ └── bucket
│ │ │ │ └── geogrid
│ │ │ │ ├── ParsedGeoHexGridBucket.java
│ │ │ │ ├── ParsedGeoHexGrid.java
│ │ │ │ ├── GeoHexGridBucket.java
│ │ │ │ ├── GeoHexGridAggregator.java
│ │ │ │ ├── GeoHexGrid.java
│ │ │ │ └── GeoHexHelper.java
│ │ │ ├── exceptions
│ │ │ ├── ResourceInUseException.java
│ │ │ ├── ConcurrentModificationException.java
│ │ │ └── IncompatibleDatasourceException.java
│ │ │ ├── geojson
│ │ │ ├── Feature.java
│ │ │ └── FeatureFactory.java
│ │ │ └── processor
│ │ │ └── FeatureProcessor.java
│ └── plugin-metadata
│ │ └── plugin-security.policy
└── yamlRestTest
│ ├── resources
│ └── rest-api-spec
│ │ └── test
│ │ ├── 10_basic.yml
│ │ └── 20_geohex_grid.yml
│ └── java
│ └── org
│ └── opensearch
│ └── geospatial
│ └── plugin
│ └── GeospatialClientYamlTestSuiteIT.java
├── client
├── NOTICE.txt
├── lombok.config
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── opensearch
│ │ └── geospatial
│ │ └── action
│ │ ├── IpEnrichmentAction.java
│ │ └── IpEnrichmentActionClient.java
│ └── test
│ └── java
│ └── org
│ └── opensearch
│ └── geospatial
│ └── action
│ ├── IpEnrichmentResponseTests.java
│ ├── IpEnrichmentActionClientTests.java
│ └── IpEnrichmentRequestTests.java
├── .idea
└── copyright
│ ├── profiles_settings.xml
│ └── SPDX_ALv2.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── release-notes
├── opensearch-geospatial.release-notes-2.16.0.0.md
├── opensearch-geospatial.release-notes-2.17.0.0.md
├── opensearch-geospatial.release-notes-2.18.0.0.md
├── opensearch-geospatial.release-notes-2.14.0.0.md
├── opensearch-geospatial.release-notes-2.15.0.0.md
├── opensearch-geospatial.release-notes-2.3.0.0.md
├── opensearch-geospatial.release-notes-2.5.0.0.md
├── opensearch-geospatial.release-notes-2.13.0.0.md
├── opensearch-geospatial.release-notes-3.0.0.0-beta1.md
├── opensearch-geospatial.release-notes-3.4.0.0.md
├── opensearch-geospatial.release-notes-2.11.1.0.md
├── opensearch-geospatial.release-notes-2.9.0.0.md
├── opensearch-geospatial.release-notes-2.11.0.0.md
├── opensearch-geospatial.release-notes-3.0.0.0-alpha1.md
├── opensearch-geospatial.release-notes-2.7.0.0.md
├── opensearch-geospatial.release-notes-2.12.0.0.md
├── opensearch-geospatial.release-notes-2.8.0.0.md
├── opensearch-geospatial.release-notes-3.0.0.0.md
├── opensearch-geospatial.release-notes-3.3.0.0.md
├── opensearch-geospatial.release-notes-3.1.0.0.md
├── opensearch-geospatial.release-notes-3.2.0.0.md
├── opensearch-geospatial.release-notes-2.19.0.0.md
├── opensearch-geospatial.release-notes-2.6.0.0.md
├── opensearch-geospatial.release-notes-2.10.0.0.md
├── opensearch-geospatial.release-notes-2.2.0.0.md
└── opensearch-geospatial.release-notes-2.4.0.0.md
├── .gitignore
├── libs
├── h3
│ ├── src
│ │ ├── test
│ │ │ └── resources
│ │ │ │ └── org
│ │ │ │ └── opensearch
│ │ │ │ └── geospatial
│ │ │ │ └── h3
│ │ │ │ ├── res00ic.txt.gz
│ │ │ │ ├── res01ic.txt.gz
│ │ │ │ ├── res02ic.txt.gz
│ │ │ │ ├── res03ic.txt.gz
│ │ │ │ ├── res04ic.txt.gz
│ │ │ │ ├── res00cells.txt.gz
│ │ │ │ ├── res01cells.txt.gz
│ │ │ │ ├── res02cells.txt.gz
│ │ │ │ ├── res03cells.txt.gz
│ │ │ │ ├── bc05r08cells.txt.gz
│ │ │ │ ├── bc05r09cells.txt.gz
│ │ │ │ ├── bc05r10cells.txt.gz
│ │ │ │ ├── bc05r11cells.txt.gz
│ │ │ │ ├── bc05r12cells.txt.gz
│ │ │ │ ├── bc05r13cells.txt.gz
│ │ │ │ ├── bc05r14cells.txt.gz
│ │ │ │ ├── bc05r15cells.txt.gz
│ │ │ │ ├── bc14r08cells.txt.gz
│ │ │ │ ├── bc14r09cells.txt.gz
│ │ │ │ ├── bc14r10cells.txt.gz
│ │ │ │ ├── bc14r11cells.txt.gz
│ │ │ │ ├── bc14r12cells.txt.gz
│ │ │ │ ├── bc14r13cells.txt.gz
│ │ │ │ ├── bc14r14cells.txt.gz
│ │ │ │ ├── bc14r15cells.txt.gz
│ │ │ │ ├── bc19r08cells.txt.gz
│ │ │ │ ├── bc19r09cells.txt.gz
│ │ │ │ ├── bc19r10cells.txt.gz
│ │ │ │ ├── bc19r11cells.txt.gz
│ │ │ │ ├── bc19r12cells.txt.gz
│ │ │ │ ├── bc19r13cells.txt.gz
│ │ │ │ ├── bc19r14cells.txt.gz
│ │ │ │ ├── bc19r15cells.txt.gz
│ │ │ │ ├── bc05r08centers.txt.gz
│ │ │ │ ├── bc05r09centers.txt.gz
│ │ │ │ ├── bc05r10centers.txt.gz
│ │ │ │ ├── bc05r11centers.txt.gz
│ │ │ │ ├── bc05r12centers.txt.gz
│ │ │ │ ├── bc05r13centers.txt.gz
│ │ │ │ ├── bc05r14centers.txt.gz
│ │ │ │ ├── bc05r15centers.txt.gz
│ │ │ │ ├── bc14r08centers.txt.gz
│ │ │ │ ├── bc14r09centers.txt.gz
│ │ │ │ ├── bc14r10centers.txt.gz
│ │ │ │ ├── bc14r11centers.txt.gz
│ │ │ │ ├── bc14r12centers.txt.gz
│ │ │ │ ├── bc14r13centers.txt.gz
│ │ │ │ ├── bc14r14centers.txt.gz
│ │ │ │ ├── bc14r15centers.txt.gz
│ │ │ │ ├── bc19r08centers.txt.gz
│ │ │ │ ├── bc19r09centers.txt.gz
│ │ │ │ ├── bc19r10centers.txt.gz
│ │ │ │ ├── bc19r11centers.txt.gz
│ │ │ │ ├── bc19r12centers.txt.gz
│ │ │ │ ├── bc19r13centers.txt.gz
│ │ │ │ ├── bc19r14centers.txt.gz
│ │ │ │ ├── bc19r15centers.txt.gz
│ │ │ │ └── NOTICE.txt
│ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── opensearch
│ │ │ └── geospatial
│ │ │ └── h3
│ │ │ └── CellBoundary.java
│ └── NOTICE.txt
└── build.gradle
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── documentation-issue.md
│ ├── config.yml
│ ├── FEATURE_REQUEST_TEMPLATE.md
│ ├── BUG_TEMPLATE.md
│ └── PROPOSAL_TEMPLATE.md
├── workflows
│ ├── draft-release-notes-workflow.yml
│ ├── add-untriaged.yml
│ ├── changelog_verifier.yml
│ ├── delete_backport_branch.yml
│ ├── links.yml
│ ├── backport.yml
│ ├── auto-release.yml
│ ├── create-documentation-issue.yml
│ ├── maven-publish.yml
│ └── CI.yml
├── PULL_REQUEST_TEMPLATE.md
└── draft-release-notes-config.yml
├── lombok.config
├── .codecov.yml
├── SECURITY.md
├── gradle.properties
├── .whitesource
├── settings.gradle
├── CHANGELOG.md
├── MAINTAINERS.md
├── ADMINS.md
├── README.md
├── RELEASING.md
└── CODE_OF_CONDUCT.md
/NOTICE:
--------------------------------------------------------------------------------
1 | OpenSearch (https://opensearch.org)
2 | Copyright OpenSearch Contributors
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/sample_invalid_less_than_two_fields.csv:
--------------------------------------------------------------------------------
1 | network
2 | 1.0.0.0/24
--------------------------------------------------------------------------------
/client/NOTICE.txt:
--------------------------------------------------------------------------------
1 | OpenSearch (https://opensearch.org)
2 | Copyright OpenSearch Contributors
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/sample_valid.csv:
--------------------------------------------------------------------------------
1 | network,country_name
2 | 1.0.0.0/24,Australia
3 | 10.0.0.0/24,USA
--------------------------------------------------------------------------------
/src/main/resources/plugin-additional-permissions.yml:
--------------------------------------------------------------------------------
1 | cluster_permissions:
2 | - "indices:data/read/mget"
3 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.16.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.16.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.16.0
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.17.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.17.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.17.0
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.18.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.18.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.18.0
4 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.14.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.14.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.14.0
4 |
5 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.15.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.15.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.15.0
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/sample_valid.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/src/test/resources/ip2geo/sample_valid.zip
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/city/city.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/src/test/resources/ip2geo/server/city/city.zip
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build
3 | .idea/*
4 | !.idea/codeStyles/codeStyleConfig.xml
5 | !.idea/copyright
6 | .DS_Store
7 | *.log
8 | out/
9 | oss/*
10 | *.iml
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/country/country.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/src/test/resources/ip2geo/server/country/country.zip
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res00ic.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res00ic.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res01ic.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res01ic.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res02ic.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res02ic.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res03ic.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res03ic.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res04ic.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res04ic.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res00cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res00cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res01cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res01cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res02cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res02cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res03cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/res03cells.txt.gz
--------------------------------------------------------------------------------
/src/main/resources/mappings/ip2geo_geoip.json:
--------------------------------------------------------------------------------
1 | {
2 | "dynamic": false,
3 | "properties": {
4 | "_cidr": {
5 | "type": "ip_range",
6 | "doc_values": false
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r08cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r08cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r09cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r09cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r10cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r10cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r11cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r11cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r12cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r12cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r13cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r13cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r14cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r14cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r15cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r15cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r08cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r08cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r09cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r09cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r10cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r10cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r11cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r11cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r12cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r12cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r13cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r13cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r14cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r14cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r15cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r15cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r08cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r08cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r09cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r09cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r10cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r10cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r11cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r11cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r12cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r12cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r13cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r13cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r14cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r14cells.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r15cells.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r15cells.txt.gz
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
2 | * @heemin32 @navneet1v @VijayanB @vamshin @jmazanec15 @naveentatikonda @junqiu-lei @martin-gaievski
3 |
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r08centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r08centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r09centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r09centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r10centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r10centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r11centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r11centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r12centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r12centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r13centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r13centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r14centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r14centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r15centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc05r15centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r08centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r08centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r09centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r09centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r10centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r10centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r11centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r11centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r12centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r12centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r13centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r13centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r14centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r14centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r15centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc14r15centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r08centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r08centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r09centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r09centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r10centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r10centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r11centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r11centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r12centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r12centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r13centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r13centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r14centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r14centers.txt.gz
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r15centers.txt.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensearch-project/geospatial/HEAD/libs/h3/src/test/resources/org/opensearch/geospatial/h3/bc19r15centers.txt.gz
--------------------------------------------------------------------------------
/libs/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 | subprojects {
6 | apply plugin: 'opensearch.build'
7 | description 'OpenSearch Geospatial H3 library'
8 | }
9 |
--------------------------------------------------------------------------------
/lombok.config:
--------------------------------------------------------------------------------
1 | # tell lombok this is your root directory
2 | config.stopBubbling = true
3 | # add @lombok.Generated annotations to all generated nodes where possible
4 | # to skip code coverage for auto generated code
5 | lombok.addLombokGeneratedAnnotation = true
6 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/manifest_template.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "URL",
3 | "db_name": "sample_valid.csv",
4 | "sha256_hash": "safasdfaskkkesadfasdf",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 3134012341236,
7 | "provider": "maxmind"
8 | }
--------------------------------------------------------------------------------
/client/lombok.config:
--------------------------------------------------------------------------------
1 | # tell lombok this is your root directory
2 | config.stopBubbling = true
3 | # add @lombok.Generated annotations to all generated nodes where possible
4 | # to skip code coverage for auto generated code
5 | lombok.addLombokGeneratedAnnotation = true
6 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.3.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.3.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.3.0
4 |
5 | ### Maintenance
6 | * Increment version to 2.3.0-SNAPSHOT ([#137](https://github.com/opensearch-project/geospatial/pull/137))
7 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.5.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.5.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.5.0
4 |
5 | ### Maintenance
6 | * Increment version to 2.5.0-SNAPSHOT ([#184](https://github.com/opensearch-project/geospatial/pull/184))
7 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.13.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.13.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.13.0
4 |
5 | ### Bug Fixes
6 | * Adjusted dependency versions to address CVEs ([#635](https://github.com/opensearch-project/geospatial/pull/635))
--------------------------------------------------------------------------------
/.idea/copyright/SPDX_ALv2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://test.com/db.zip",
3 | "db_name": "sample_valid.csv",
4 | "sha256_hash": "safasdfaskkkesadfasdf",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 3134012341236,
7 | "provider": "sample_provider"
8 | }
--------------------------------------------------------------------------------
/libs/h3/src/test/resources/org/opensearch/geospatial/h3/NOTICE.txt:
--------------------------------------------------------------------------------
1 | The files under this directory come from the input test files from Uber's h3 repository
2 | (https://github.com/uber/h3/tree/master/tests/inputfiles) and are made available here
3 | under the same Apache 2 license.
4 |
5 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/another_manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://test.com/db.zip",
3 | "db_name": "sample_valid.csv",
4 | "sha256_hash": "safasdfaskkkesadfasdf",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 3134012341236,
7 | "provider": "sample_provider"
8 | }
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/manifest_invalid_url.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "invalid://test.com/db.zip",
3 | "db_name": "sample_valid.csv",
4 | "sha256_hash": "safasdfaskkkesadfasdf",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 3134012341236,
7 | "provider": "sample_provider"
8 | }
--------------------------------------------------------------------------------
/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml:
--------------------------------------------------------------------------------
1 | "Test that geospatial and job scheduler plugins are loaded in OpenSearch":
2 | - do:
3 | cat.plugins:
4 | local: true
5 | h: component
6 |
7 | - match:
8 | $body: /^opensearch-geospatial\nopensearch-job-scheduler\n$/
9 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.0.0.0-beta1.md:
--------------------------------------------------------------------------------
1 | ## Version 3.0.0.0-beta1 Release Notes
2 |
3 | Compatible with OpenSearch 2.19.0
4 |
5 | ### Maintenance
6 | * Persist necessary license and developer information in maven pom ([#732](https://github.com/opensearch-project/geospatial/pull/732))
7 |
--------------------------------------------------------------------------------
/.codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | require_ci_to_pass: yes
3 |
4 | coverage:
5 | precision: 2
6 | round: down
7 | range: "70...100"
8 | status:
9 | project:
10 | default:
11 | target: 70% # the required coverage value
12 | threshold: 1% # the leniency in hitting the target
13 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/city/manifest_local.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "http://localhost:8001/city/city.zip",
3 | "db_name": "data.csv",
4 | "sha256_hash": "oDPgEv+9+kNov7bdQQiLrhr8jQeEPdLnuJ22Hz5npvk=",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 1683590400000,
7 | "provider": "opensearch"
8 | }
9 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/country/manifest_local.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "http://localhost:8001/country/country.zip",
3 | "db_name": "data.csv",
4 | "sha256_hash": "oDPgEv+4+kNov7bdQQiLrhr8jQeEPdLnuJ11Hz5npvk=",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 1683590400000,
7 | "provider": "opensearch"
8 | }
9 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | ## Reporting a Vulnerability
2 |
3 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.4.0.0.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Version 3.4.0 Release Notes
4 |
5 | Compatible with OpenSearch and OpenSearch Dashboards version 3.4.0
6 |
7 |
8 | ### Maintenance
9 | - Update to Gradle 9.2 and run CI checks with JDK 25 ([#816](https://github.com/opensearch-project/geospatial/issues/816))
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation-issue.md:
--------------------------------------------------------------------------------
1 | **Is your feature request related to a problem?**
2 | A new feature has been added.
3 |
4 | **What solution would you like?**
5 | Document the usage of the new feature.
6 |
7 | **What alternatives have you considered?**
8 | N/A
9 |
10 | **Do you have any additional context?**
11 | See please
12 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | contact_links:
2 | - name: OpenSearch Community Support
3 | url: https://discuss.opendistrocommunity.dev/
4 | about: Please ask and answer questions here.
5 | - name: AWS/Amazon Security
6 | url: https://aws.amazon.com/security/vulnerability-reporting/
7 | about: Please report security vulnerabilities here.
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.11.1.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.11.1.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.11.1
4 |
5 | ### Bug Fixes
6 | * Add default value in denylist ([#583](https://github.com/opensearch-project/geospatial/pull/583))
7 | * Add denylist ip config for datasource endpoint ([#573](https://github.com/opensearch-project/geospatial/pull/573))
8 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/city/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://raw.githubusercontent.com/opensearch-project/geospatial/main/src/test/resources/ip2geo/server/city/city.zip",
3 | "db_name": "data.csv",
4 | "sha256_hash": "oDPgEv+9+kNov7bdQQiLrhr8jQeEPdLnuJ22Hz5npvk=",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 1683590400000,
7 | "provider": "opensearch"
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionSha256Sum=16f2b95838c1ddcf7242b1c39e7bbbb43c842f1f1a1a0dc4959b6d4d68abcac3
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-all.zip
5 | networkTimeout=10000
6 | validateDistributionUrl=true
7 | zipStoreBase=GRADLE_USER_HOME
8 | zipStorePath=wrapper/dists
9 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.9.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.9.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.9.0
4 |
5 | ### Maintenance
6 | Increment version to 2.9.0-SNAPSHOT ([#329](https://github.com/opensearch-project/geospatial/pull/329))
7 |
8 | ### Refactoring
9 | Change package for Strings.hasText ([#314](https://github.com/opensearch-project/geospatial/pull/314))
10 |
--------------------------------------------------------------------------------
/src/test/resources/ip2geo/server/country/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://raw.githubusercontent.com/opensearch-project/geospatial/main/src/test/resources/ip2geo/server/country/country.zip",
3 | "db_name": "data.csv",
4 | "sha256_hash": "oDPgEv+4+kNov7bdQQiLrhr8jQeEPdLnuJ11Hz5npvk=",
5 | "valid_for_in_days": 30,
6 | "updated_at_in_epoch_milli": 1683590400000,
7 | "provider": "opensearch"
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/annotation/VisibleForTesting.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: Apache-2.0
3 | *
4 | * The OpenSearch Contributors require contributions made to
5 | * this file be licensed under the Apache-2.0 license or a
6 | * compatible open source license.
7 | */
8 |
9 | package org.opensearch.geospatial.annotation;
10 |
11 | public @interface VisibleForTesting {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/plugin-metadata/plugin-security.policy:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: Apache-2.0
3 | *
4 | * The OpenSearch Contributors require contributions made to
5 | * this file be licensed under the Apache-2.0 license or a
6 | * compatible open source license.
7 | */
8 |
9 | grant {
10 | // needed by Ip2Geo datasource to get GeoIP database
11 | permission java.net.SocketPermission "*", "connect,resolve";
12 | };
13 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.11.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.11.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.11.0
4 |
5 | ### Bug Fixes
6 | * Fix flaky test, testIndexingMultiPolygon ([#483](https://github.com/opensearch-project/geospatial/pull/483))
7 |
8 | ### Infrastructure
9 | * Add integration test against security enabled cluster ([#513](https://github.com/opensearch-project/geospatial/pull/513))
10 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.0.0.0-alpha1.md:
--------------------------------------------------------------------------------
1 | ## Version 3.0.0.0-alpha1 Release Notes
2 |
3 | Compatible with OpenSearch 3.0.0.0-alpha1
4 |
5 | ### Maintenance
6 | * Set geospatial plugin 3.0.0 baseline JDK version to JDK-21 ([#695](https://github.com/opensearch-project/geospatial/pull/695))
7 | * Bump gradle 8.10.2 / JDK 23 / 3.0.0.0-alpha1 support on geospatial ([#723](https://github.com/opensearch-project/geospatial/pull/723))
8 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.7.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.7.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.7.0
4 |
5 | ### Infrastructure
6 | * Publish snapshots to maven via GHA ([#233](https://github.com/opensearch-project/geospatial/pull/233))
7 | * Update snapshot version and fix compilation issues ([#237](https://github.com/opensearch-project/geospatial/pull/237))
8 | * Add CHANGELOG ([#238](https://github.com/opensearch-project/geospatial/pull/238))
9 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright OpenSearch Contributors
3 | # SPDX-License-Identifier: Apache-2.0
4 | #
5 |
6 | org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
7 | --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
8 | --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
9 | --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
10 | --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.12.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.12.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.12.0
4 |
5 | ### Features
6 | * Add denylist ip config for datasource endpoint ([#573](https://github.com/opensearch-project/geospatial/pull/573))
7 | ### Maintenance
8 | * Upgrade gradle to 8.4 ([#596](https://github.com/opensearch-project/geospatial/pull/596))
9 | * Update spotless and eclipse dependencies ([#620](https://github.com/opensearch-project/geospatial/pull/620))
--------------------------------------------------------------------------------
/.whitesource:
--------------------------------------------------------------------------------
1 | {
2 | "scanSettings": {
3 | "configMode": "AUTO",
4 | "configExternalURL": "",
5 | "projectToken": "",
6 | "baseBranches": []
7 | },
8 | "checkRunSettings": {
9 | "vulnerableCheckRunConclusionLevel": "failure",
10 | "displayMode": "diff"
11 | },
12 | "issueSettings": {
13 | "minSeverityLevel": "LOW",
14 | "issueType": "DEPENDENCY"
15 | },
16 | "remediateSettings": {
17 | "workflowRules": {
18 | "enabled": true
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/ip2geo/jobscheduler/DatasourceTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.ip2geo.jobscheduler;
7 |
8 | /**
9 | * Task that {@link DatasourceRunner} will run
10 | */
11 | public enum DatasourceTask {
12 | /**
13 | * Do everything
14 | */
15 | ALL,
16 |
17 | /**
18 | * Only delete unused indices
19 | */
20 | DELETE_UNUSED_INDICES
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/shared/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.shared;
7 |
8 | import java.util.Locale;
9 |
10 | import org.opensearch.Version;
11 |
12 | public class Constants {
13 | public static final String USER_AGENT_KEY = "User-Agent";
14 | public static final String USER_AGENT_VALUE = String.format(Locale.ROOT, "OpenSearch/%s vanilla", Version.CURRENT.toString());
15 | }
16 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.8.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.8.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.8.0
4 |
5 | ### Infrastructure
6 | * Make jacoco report to be generated faster in local ([#267](https://github.com/opensearch-project/geospatial/pull/267))
7 | * Exclude lombok generated code from jacoco coverage report ([#268](https://github.com/opensearch-project/geospatial/pull/268))
8 |
9 | ### Maintenance
10 | * Change package for Strings.hasText ([#314](https://github.com/opensearch-project/geospatial/pull/314))
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/6.5.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'geospatial'
11 |
12 | include ":libs"
13 | include ":libs:h3"
14 |
15 | include 'client'
16 | project(":client").name = rootProject.name + "-client"
17 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.0.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 3.0.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 3.0.0
4 |
5 | ### Maintenance
6 | * Set geospatial plugin 3.0.0 baseline JDK version to JDK-21 ([#695](https://github.com/opensearch-project/geospatial/pull/695))
7 | * Bump gradle 8.10.2 / JDK 23 / 3.0.0.0-alpha1 support on geospatial ([#723](https://github.com/opensearch-project/geospatial/pull/723))
8 | * Persist necessary license and developer information in maven pom ([#732](https://github.com/opensearch-project/geospatial/pull/732))
9 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/services/org.opensearch.jobscheduler.spi.JobSchedulerExtension:
--------------------------------------------------------------------------------
1 | #
2 | # SPDX-License-Identifier: Apache-2.0
3 | #
4 | # The OpenSearch Contributors require contributions made to
5 | # this file be licensed under the Apache-2.0 license or a
6 | # compatible open source license.
7 | #
8 |
9 | # This file is needed to register DatasourceExtension in job scheduler framework
10 | # See https://github.com/opensearch-project/job-scheduler/blob/main/README.md#getting-started
11 | org.opensearch.geospatial.ip2geo.jobscheduler.DatasourceExtension
12 |
--------------------------------------------------------------------------------
/.github/workflows/draft-release-notes-workflow.yml:
--------------------------------------------------------------------------------
1 | name: Release Drafter
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | update_release_draft:
10 | name: Update draft release notes
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Update draft release notes
14 | uses: release-drafter/release-drafter@v5
15 | with:
16 | config-name: draft-release-notes-config.yml
17 | name: Version (set here)
18 | tag: (None)
19 | env:
20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.3.0.0.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Version 3.3.0 Release Notes
4 |
5 | Compatible with OpenSearch and OpenSearch Dashboards version 3.3.0
6 |
7 | ### Bug Fixes
8 | * fix: Update System.env syntax for Gradle 9 compatibility ([#791](https://github.com/opensearch-project/geospatial/pull/791))
9 |
10 | ### Maintenance
11 | * Remove deprecated URL(String) usage ([#795](https://github.com/opensearch-project/geospatial/pull/795))
12 | * Increment version to 3.3.0-SNAPSHOT ([#788](https://github.com/opensearch-project/geospatial/pull/788))
13 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.1.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 3.1.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 3.1.0
4 |
5 | ### Bug Fixes
6 | * Reset datasource metadata when failed to update it in postIndex and postDelete to force refresh it from the primary index shard. ([#761](https://github.com/opensearch-project/geospatial/pull/761))
7 | * Refresh the Ip2Geo cache and retry one more time when we run into an issue. ([#766](https://github.com/opensearch-project/geospatial/pull/766))
8 | ### Maintenance
9 | * Fix a unit test and update github workflow to use actions/setup-java@v3.
--------------------------------------------------------------------------------
/.github/workflows/add-untriaged.yml:
--------------------------------------------------------------------------------
1 | name: Apply 'untriaged' label during issue lifecycle
2 |
3 | on:
4 | issues:
5 | types: [opened, reopened, transferred]
6 |
7 | jobs:
8 | apply-label:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/github-script@v6
12 | with:
13 | script: |
14 | github.rest.issues.addLabels({
15 | issue_number: context.issue.number,
16 | owner: context.repo.owner,
17 | repo: context.repo.repo,
18 | labels: ['untriaged']
19 | })
20 |
--------------------------------------------------------------------------------
/src/test/java/org/opensearch/geospatial/shared/URLBuilderTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.shared;
7 |
8 | import static org.opensearch.geospatial.shared.URLBuilder.getPluginURLPrefix;
9 |
10 | import org.opensearch.test.OpenSearchTestCase;
11 |
12 | public class URLBuilderTests extends OpenSearchTestCase {
13 |
14 | public void testPluginPrefix() {
15 | String pluginPrefix = getPluginURLPrefix();
16 | assertEquals("_plugins/geospatial", pluginPrefix);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 | All notable changes to this project are documented in this file.
3 |
4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5 | See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on how to add changelog entries.
6 |
7 | ## [Unreleased 3.x](https://github.com/opensearch-project/geospatial/compare/main...HEAD)
8 | ### Features
9 | ### Enhancements
10 | ### Bug Fixes
11 | ### Infrastructure
12 | ### Documentation
13 | ### Maintenance
14 |
15 | ### Refactoring
16 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/stats/upload/UploadStatsAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.stats.upload;
7 |
8 | import org.opensearch.action.ActionType;
9 |
10 | public class UploadStatsAction extends ActionType {
11 |
12 | public static final UploadStatsAction INSTANCE = new UploadStatsAction();
13 | public static final String NAME = "cluster:admin/geospatial/stats";
14 |
15 | public UploadStatsAction() {
16 | super(NAME, UploadStatsResponse::new);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-3.2.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 3.2.0 Release Notes
2 |
3 | Compatible with OpenSearch and OpenSearch Dashboards version 3.2.0
4 |
5 | ### Bug Fixes
6 | * Block redirect in IP2Geo and move validation to transport action ([#782](https://github.com/opensearch-project/geospatial/pull/782))
7 |
8 | ### Maintenance
9 | * Upgrade gradle to 8.14.3 and run CI checks with JDK24 ([#776](https://github.com/opensearch-project/geospatial/pull/776))
10 |
11 | ### Refactoring
12 | * Replace usages of ThreadContext.stashContext with pluginSubject.runAs ([#715](https://github.com/opensearch-project/geospatial/pull/715))
--------------------------------------------------------------------------------
/.github/workflows/changelog_verifier.yml:
--------------------------------------------------------------------------------
1 | name: "Changelog Verifier"
2 | on:
3 | pull_request:
4 | types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]
5 |
6 | jobs:
7 | # Enforces the update of a changelog file on every pull request
8 | verify-changelog:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | with:
13 | token: ${{ secrets.GITHUB_TOKEN }}
14 | ref: ${{ github.event.pull_request.head.sha }}
15 |
16 | - uses: dangoslen/changelog-enforcer@v3
17 | with:
18 | skipLabels: "autocut, skip-changelog"
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🎆 Feature request
3 | about: Request a feature in this project
4 | title: '[FEATURE]'
5 | labels: enhancement
6 | assignees: ''
7 | ---
8 | **Is your feature request related to a problem?**
9 | A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_
10 |
11 | **What solution would you like?**
12 | A clear and concise description of what you want to happen.
13 |
14 | **What alternatives have you considered?**
15 | A clear and concise description of any alternative solutions or features you've considered.
16 |
17 | **Do you have any additional context?**
18 | Add any other context or screenshots about the feature request here.
--------------------------------------------------------------------------------
/.github/workflows/delete_backport_branch.yml:
--------------------------------------------------------------------------------
1 | name: Delete merged branch of the backport PRs
2 | on:
3 | pull_request:
4 | types:
5 | - closed
6 |
7 | jobs:
8 | delete-branch:
9 | runs-on: ubuntu-latest
10 | permissions:
11 | contents: write
12 | if: startsWith(github.event.pull_request.head.ref,'backport/') || startsWith(github.event.pull_request.head.ref,'release-chores/')
13 | steps:
14 | - name: Delete merged branch
15 | uses: actions/github-script@v7
16 | with:
17 | script: |
18 | github.rest.git.deleteRef({
19 | owner: context.repo.owner,
20 | repo: context.repo.repo,
21 | ref: `heads/${context.payload.pull_request.head.ref}`,
22 | })
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.19.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.19.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.19.0
4 |
5 | ### Features
6 | * Introduce new Java artifact geospatial-client to facilitate cross plugin communication. ([#700](https://github.com/opensearch-project/geospatial/pull/700))
7 |
8 | ### Infrastructure
9 | * Github ci-runner Node.js issue fix ([#701](https://github.com/opensearch-project/geospatial/pull/701))
10 | * Github CI pipeline update to publish geospatial-client Jar ([#706](https://github.com/opensearch-project/geospatial/pull/706))
11 |
12 | ### Refactoring
13 | * Use instance of LockService instantiated in JobScheduler through Guice ([#677](https://github.com/opensearch-project/geospatial/pull/677))
--------------------------------------------------------------------------------
/release-notes/opensearch-geospatial.release-notes-2.6.0.0.md:
--------------------------------------------------------------------------------
1 | ## Version 2.6.0.0 Release Notes
2 |
3 | Compatible with OpenSearch 2.6.0
4 |
5 | ### Maintenance
6 | * Upgrade snapshot version to 2.6 for 2.x ([#208](https://github.com/opensearch-project/geospatial/pull/208))
7 |
8 | ### Features
9 | * Add limit to geojson upload API ([#218](https://github.com/opensearch-project/geospatial/pull/218))
10 | * Allow API to accept any index name without suffix ([#182](https://github.com/opensearch-project/geospatial/pull/182))
11 |
12 | ### Refactoring
13 | * Fix compilation error and test failure ([#210](https://github.com/opensearch-project/geospatial/pull/210))
14 | * Replace Locale.getDefault() with Local.ROOT ([#214](https://github.com/opensearch-project/geospatial/pull/214))
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/index/mapper/xyshape/XYShapeFieldTypeParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.index.mapper.xyshape;
7 |
8 | import java.util.Map;
9 |
10 | import org.opensearch.index.mapper.AbstractShapeGeometryFieldMapper;
11 |
12 | /**
13 | * XYShapeFieldTypeParser to parse and validate mapping parameters
14 | */
15 | public final class XYShapeFieldTypeParser extends AbstractShapeGeometryFieldMapper.TypeParser {
16 | @Override
17 | protected AbstractShapeGeometryFieldMapper.Builder newBuilder(String name, Map params) {
18 | return new XYShapeFieldMapper.XYShapeFieldMapperBuilder(name);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/constants/IndexSetting.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.constants;
7 |
8 | /**
9 | * Collection of keys for index setting
10 | */
11 | public class IndexSetting {
12 | public static final String NUMBER_OF_SHARDS = "index.number_of_shards";
13 | public static final String NUMBER_OF_REPLICAS = "index.number_of_replicas";
14 | public static final String REFRESH_INTERVAL = "index.refresh_interval";
15 | public static final String AUTO_EXPAND_REPLICAS = "index.auto_expand_replicas";
16 | public static final String HIDDEN = "index.hidden";
17 | public static final String BLOCKS_WRITE = "index.blocks.write";
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/stats/upload/UploadStatsRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.stats.upload;
7 |
8 | import java.io.IOException;
9 |
10 | import org.opensearch.action.support.nodes.BaseNodesRequest;
11 | import org.opensearch.core.common.io.stream.StreamInput;
12 |
13 | public class UploadStatsRequest extends BaseNodesRequest {
14 |
15 | /**
16 | * Empty constructor needed for UploadStatsTransportAction
17 | */
18 | public UploadStatsRequest() {
19 | super((String[]) null);
20 | }
21 |
22 | protected UploadStatsRequest(StreamInput in) throws IOException {
23 | super(in);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/.github/workflows/links.yml:
--------------------------------------------------------------------------------
1 | name: Link Checker
2 | on:
3 | push:
4 | branches: [ main ]
5 | pull_request:
6 | branches: [ main ]
7 |
8 | jobs:
9 | linkchecker:
10 |
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v2
15 | - name: lychee Link Checker
16 | id: lychee
17 | uses: lycheeverse/lychee-action@master
18 | with:
19 | args: --accept=200,403,429 **/*.html **/*.md **/*.txt **/*.json --exclude "https://test.com/db.zip" --exclude "http://localhost:8001/country/country.zip" --exclude "http://localhost:8001/city/city.zip"
20 | env:
21 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22 | - name: Fail if there were link errors
23 | run: exit ${{ steps.lychee.outputs.exit_code }}
--------------------------------------------------------------------------------
/.github/workflows/backport.yml:
--------------------------------------------------------------------------------
1 | name: Backport
2 | on:
3 | pull_request_target:
4 | types:
5 | - closed
6 | - labeled
7 |
8 | jobs:
9 | backport:
10 | runs-on: ubuntu-latest
11 | permissions:
12 | contents: write
13 | pull-requests: write
14 | name: Backport
15 | steps:
16 | - name: GitHub App token
17 | id: github_app_token
18 | uses: tibdex/github-app-token@v1.5.0
19 | with:
20 | app_id: ${{ secrets.APP_ID }}
21 | private_key: ${{ secrets.APP_PRIVATE_KEY }}
22 | installation_id: 22958780
23 |
24 | - name: Backport
25 | uses: VachaShah/backport@v1.1.4
26 | with:
27 | github_token: ${{ steps.github_app_token.outputs.token }}
28 | branch_name: backport/backport-${{ github.event.number }}
29 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/ip2geo/action/GetDatasourceAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.ip2geo.action;
7 |
8 | import org.opensearch.action.ActionType;
9 |
10 | /**
11 | * Ip2Geo datasource get action
12 | */
13 | public class GetDatasourceAction extends ActionType {
14 | /**
15 | * Get datasource action instance
16 | */
17 | public static final GetDatasourceAction INSTANCE = new GetDatasourceAction();
18 | /**
19 | * Get datasource action name
20 | */
21 | public static final String NAME = "cluster:admin/geospatial/datasource/get";
22 |
23 | private GetDatasourceAction() {
24 | super(NAME, GetDatasourceResponse::new);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/client/src/main/java/org/opensearch/geospatial/action/IpEnrichmentAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.action;
7 |
8 | import org.opensearch.action.ActionType;
9 | import org.opensearch.core.action.ActionResponse;
10 |
11 | /**
12 | * An ActionType registered on OpenSearch registry, for inter-cluster transportAction call,
13 | * to resolve GeoLocation for IP String.
14 | */
15 | public class IpEnrichmentAction extends ActionType {
16 |
17 | public static final IpEnrichmentAction INSTANCE = new IpEnrichmentAction();
18 |
19 | public static final String NAME = "cluster:admin/geospatial/ipenrichment/get";
20 |
21 | public IpEnrichmentAction() {
22 | super(NAME, IpEnrichmentResponse::new);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🐛 Bug report
3 | about: Create a report to help us improve
4 | title: '[BUG]'
5 | labels: 'bug, untriaged'
6 | assignees: ''
7 | ---
8 |
9 | **What is the bug?**
10 | A clear and concise description of the bug.
11 |
12 | **How can one reproduce the bug?**
13 | Steps to reproduce the behavior:
14 | 1. Go to '...'
15 | 2. Click on '....'
16 | 3. Scroll down to '....'
17 | 4. See error
18 |
19 | **What is the expected behavior?**
20 | A clear and concise description of what you expected to happen.
21 |
22 | **What is your host/environment?**
23 | - OS: [e.g. iOS]
24 | - Version [e.g. 22]
25 | - Plugins
26 |
27 | **Do you have any screenshots?**
28 | If applicable, add screenshots to help explain your problem.
29 |
30 | **Do you have any additional context?**
31 | Add any other context about the problem.
32 |
--------------------------------------------------------------------------------
/.github/workflows/auto-release.yml:
--------------------------------------------------------------------------------
1 | name: Releases
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 |
8 | jobs:
9 | build:
10 | runs-on: ubuntu-latest
11 | permissions:
12 | contents: write
13 | steps:
14 | - name: GitHub App token
15 | id: github_app_token
16 | uses: tibdex/github-app-token@v1.5.0
17 | with:
18 | app_id: ${{ secrets.APP_ID }}
19 | private_key: ${{ secrets.APP_PRIVATE_KEY }}
20 | installation_id: 22958780
21 | - name: Get tag
22 | id: tag
23 | uses: dawidd6/action-get-tag@v1
24 | - uses: actions/checkout@v2
25 | - uses: ncipollo/release-action@v1
26 | with:
27 | github_token: ${{ steps.github_app_token.outputs.token }}
28 | bodyFile: release-notes/opensearch-geospatial.release-notes-${{steps.tag.outputs.tag}}.md
29 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/shared/URLBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.shared;
7 |
8 | import lombok.AccessLevel;
9 | import lombok.NoArgsConstructor;
10 |
11 | /**
12 | * Helper to build url path for this plugin
13 | */
14 | @NoArgsConstructor(access = AccessLevel.PRIVATE)
15 | public final class URLBuilder {
16 |
17 | public static final String NAME = "geospatial";
18 | public static final String PLUGIN_PREFIX = "_plugins";
19 | public static final String URL_DELIMITER = "/";
20 |
21 | /**
22 | * @return plugin URL prefix path for {@link org.opensearch.geospatial.plugin.GeospatialPlugin}
23 | */
24 | public static String getPluginURLPrefix() {
25 | return String.join(URL_DELIMITER, PLUGIN_PREFIX, NAME);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/action/upload/geojson/UploadGeoJSONAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * SPDX-License-Identifier: Apache-2.0
3 | *
4 | * The OpenSearch Contributors require contributions made to
5 | * this file be licensed under the Apache-2.0 license or a
6 | * compatible open source license.
7 | *
8 | * Modifications Copyright OpenSearch Contributors. See
9 | * GitHub history for details.
10 | */
11 |
12 | package org.opensearch.geospatial.action.upload.geojson;
13 |
14 | import org.opensearch.action.ActionType;
15 |
16 | public class UploadGeoJSONAction extends ActionType {
17 |
18 | public static final UploadGeoJSONAction INSTANCE = new UploadGeoJSONAction();
19 | public static final String NAME = "cluster:admin/upload_geojson_action";
20 |
21 | private UploadGeoJSONAction() {
22 | super(NAME, UploadGeoJSONResponse::new);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/ip2geo/action/PutDatasourceAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.ip2geo.action;
7 |
8 | import org.opensearch.action.ActionType;
9 | import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
10 |
11 | /**
12 | * Ip2Geo datasource creation action
13 | */
14 | public class PutDatasourceAction extends ActionType {
15 | /**
16 | * Put datasource action instance
17 | */
18 | public static final PutDatasourceAction INSTANCE = new PutDatasourceAction();
19 | /**
20 | * Put datasource action name
21 | */
22 | public static final String NAME = "cluster:admin/geospatial/datasource/put";
23 |
24 | private PutDatasourceAction() {
25 | super(NAME, AcknowledgedResponse::new);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/libs/h3/NOTICE.txt:
--------------------------------------------------------------------------------
1 | OpenSearch (https://opensearch.org/)
2 | Copyright OpenSearch Contributors
3 |
4 | --
5 | Elastic-hex
6 |
7 | Copyright 2022 Elasticsearch B.V.
8 |
9 | --
10 |
11 | This project is based on a modification of https://github.com/uber/h3 which is licensed under the Apache 2.0 License.
12 |
13 | Copyright 2017-2021 Uber Technologies, Inc.
14 |
15 | Licensed under the Apache License, Version 2.0 (the "License");
16 | you may not use this file except in compliance with the License.
17 | You may obtain a copy of the License at
18 |
19 | http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | Unless required by applicable law or agreed to in writing, software
22 | distributed under the License is distributed on an "AS IS" BASIS,
23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | See the License for the specific language governing permissions and
25 | limitations under the License.
26 |
--------------------------------------------------------------------------------
/client/src/test/java/org/opensearch/geospatial/action/IpEnrichmentResponseTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.action;
7 |
8 | import java.util.Map;
9 |
10 | import org.junit.Assert;
11 | import org.junit.Test;
12 |
13 | public class IpEnrichmentResponseTests {
14 |
15 | /**
16 | * To simulate when Response class being passed from one plugin to the other.
17 | */
18 | @Test
19 | public void testFromActionResponseWithValidPayload() {
20 |
21 | Map payload = Map.of("k1", "v1");
22 | IpEnrichmentResponse response = new IpEnrichmentResponse(payload);
23 | IpEnrichmentResponse castedResponse = IpEnrichmentResponse.fromActionResponse(response);
24 | Assert.assertEquals(response.getGeoLocationData(), castedResponse.getGeoLocationData());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/ip2geo/action/DeleteDatasourceAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.ip2geo.action;
7 |
8 | import org.opensearch.action.ActionType;
9 | import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
10 |
11 | /**
12 | * Ip2Geo datasource delete action
13 | */
14 | public class DeleteDatasourceAction extends ActionType {
15 | /**
16 | * Delete datasource action instance
17 | */
18 | public static final DeleteDatasourceAction INSTANCE = new DeleteDatasourceAction();
19 | /**
20 | * Delete datasource action name
21 | */
22 | public static final String NAME = "cluster:admin/geospatial/datasource/delete";
23 |
24 | private DeleteDatasourceAction() {
25 | super(NAME, AcknowledgedResponse::new);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/org/opensearch/geospatial/ip2geo/action/UpdateDatasourceAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.ip2geo.action;
7 |
8 | import org.opensearch.action.ActionType;
9 | import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
10 |
11 | /**
12 | * Ip2Geo datasource update action
13 | */
14 | public class UpdateDatasourceAction extends ActionType {
15 | /**
16 | * Update datasource action instance
17 | */
18 | public static final UpdateDatasourceAction INSTANCE = new UpdateDatasourceAction();
19 | /**
20 | * Update datasource action name
21 | */
22 | public static final String NAME = "cluster:admin/geospatial/datasource/update";
23 |
24 | private UpdateDatasourceAction() {
25 | super(NAME, AcknowledgedResponse::new);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/yamlRestTest/java/org/opensearch/geospatial/plugin/GeospatialClientYamlTestSuiteIT.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright OpenSearch Contributors
3 | * SPDX-License-Identifier: Apache-2.0
4 | */
5 |
6 | package org.opensearch.geospatial.plugin;
7 |
8 | import org.opensearch.test.rest.yaml.ClientYamlTestCandidate;
9 | import org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase;
10 |
11 | import com.carrotsearch.randomizedtesting.annotations.Name;
12 | import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
13 |
14 | public class GeospatialClientYamlTestSuiteIT extends OpenSearchClientYamlSuiteTestCase {
15 |
16 | public GeospatialClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
17 | super(testCandidate);
18 | }
19 |
20 | @ParametersFactory
21 | public static Iterable