You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable choice of raising bulk insert errors, logging (#364)
**Related Issue(s):**
- #346
**Description:**
- Added logging to bulk insertion methods to provide detailed feedback
on errors encountered during operations.
- Introduced the `RAISE_ON_BULK_ERROR` environment variable to control
whether bulk insertion methods raise exceptions on errors (`true`) or
log warnings and continue processing (`false`).
**PR Checklist:**
- [x] Code is formatted and linted (run `pre-commit run --all-files`)
- [x] Tests pass (run `make test`)
- [x] Documentation has been updated to reflect changes, if applicable
- [x] Changes are added to the changelog
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
10
10
### Added
11
11
12
+
- Added logging to bulk insertion methods to provide detailed feedback on errors encountered during operations. [#364](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/364)
13
+
- Introduced the `RAISE_ON_BULK_ERROR` environment variable to control whether bulk insertion methods raise exceptions on errors (`true`) or log warnings and continue processing (`false`). [#364](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/364)
12
14
- Added code coverage reporting to the test suite using pytest-cov. [#87](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/issues/87)
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,8 @@ You can customize additional settings in your `.env` file:
113
113
|`BACKEND`| Tests-related variable |`elasticsearch` or `opensearch` based on the backend | Optional |
114
114
|`ELASTICSEARCH_VERSION`| Version of Elasticsearch to use. |`8.11.0`| Optional |
115
115
|`ENABLE_DIRECT_RESPONSE`| Enable direct response for maximum performance (disables all FastAPI dependencies, including authentication, custom status codes, and validation) |`false`| Optional |
116
-
|`OPENSEARCH_VERSION`| OpenSearch version |`2.11.1`| Optional |
116
+
| `OPENSEARCH_VERSION` | OpenSearch version | `2.11.1` | Optional
117
+
|`RAISE_ON_BULK_ERROR`| Controls whether bulk insert operations raise exceptions on errors. If set to `true`, the operation will stop and raise an exception when an error occurs. If set to `false`, errors will be logged, and the operation will continue. |`false`| Optional |
117
118
118
119
> [!NOTE]
119
120
> The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, and `ES_VERIFY_CERTS` apply to both Elasticsearch and OpenSearch backends, so there is no need to rename the key names to `OS_` even if you're using OpenSearch.
0 commit comments