Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 1.34 KB

File metadata and controls

74 lines (48 loc) · 1.34 KB

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.