Skip to content

stac-utils/stac-fastapi-elasticsearch-opensearch

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Phil Varner
Apr 27, 2022
7e2894e · Apr 27, 2022
Apr 25, 2022
Mar 23, 2022
Apr 25, 2022
Mar 23, 2022
Feb 23, 2022
Apr 26, 2022
Feb 22, 2022
Apr 26, 2022
Apr 27, 2022
Apr 25, 2022
Apr 25, 2022
Jan 29, 2022
Mar 23, 2022
Apr 25, 2022
Feb 2, 2022
Apr 25, 2022
Jan 30, 2022

Repository files navigation

STAC FastAPI Elasticsearch

Elasticsearch backend for stac-fastapi.

WIP This backend does not have any production deployments yet, so use the pgstac backend instead if that's what you need.

For changes, see the Changelog.

Development Environment Setup

To install the classes in your local Python env, run:

pip install -e 'stac_fastapi/elasticsearch[dev]'

Pre-commit

Install pre-commit.

Prior to commit, run:

pre-commit run --all-files`

Building

docker-compose build

Running API on localhost:8080

docker-compose up

By default, docker-compose uses Elasticsearch 8.x. However, most recent 7.x versions should also work. If you wish to use a different version, put the following in a file named .env in the same directory you run docker-compose from:

ELASTICSEARCH_VERSION=7.17.1

To create a new Collection:

curl -X "POST" "http://localhost:8080/collections" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "id": "my_collection"
}'

Note: this "Collections Transaction" behavior is not part of the STAC API, but may be soon.

Testing

make test

Ingest sample data

make ingest

Elasticsearch Mappings

Mappings apply to search index, not source.