diff --git a/CHANGELOG.md b/CHANGELOG.md index 25bb334..712518a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Password input field in connector creation form (both standalone page and modal) - `migrate_connector_secrets` management command to migrate existing env-var-based credentials into encrypted secrets - `cryptography>=42.0` dependency +- **Elasticsearch connector** — connect to Elasticsearch clusters and ingest documents + - API key, basic auth, bearer token, and Elastic Cloud (`cloud_id`) authentication + - PIT + `search_after` pagination with automatic fallback to `helpers.scan()` for older ES versions + - Configurable field mapping (`content_field`, `title_field`, `author_field`, `date_field`) + - Custom Elasticsearch Query DSL filter support + - TLS certificate verification control + - HTML content auto-detection + - Fallback content extraction when configured content field is missing + - 35 unit tests covering all connector functionality - Apache 2.0 LICENSE file - `CONTRIBUTING.md`, `CHANGELOG.md`, `SECURITY.md` - `SECRET_KEY` startup validation (refuses to start with placeholder key in production) @@ -55,6 +64,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SCORE 0-100 scoring with A-E letter grades - PDF report generation with radar charts - RAG chat interface -- SharePoint, Confluence, and Elasticsearch connectors +- SharePoint and Confluence connectors - Docker deployment support - French and English internationalization diff --git a/connectors/generic.py b/connectors/generic.py index 534fd9f..4dfaba7 100644 --- a/connectors/generic.py +++ b/connectors/generic.py @@ -147,6 +147,9 @@ def _fetch_http(self, source_id: str) -> RawDocument: resp = httpx.get(source_id, timeout=60, follow_redirects=True) resp.raise_for_status() + if not resp.content: + raise ValueError(f"Empty response from {source_id} (HTTP {resp.status_code})") + content_type = resp.headers.get("content-type", "").split(";")[0].strip() etag = resp.headers.get("etag", "") version = etag or hashlib.sha256(resp.content).hexdigest()[:16] diff --git a/connectors/templates/connectors/_connector_cards.html b/connectors/templates/connectors/_connector_cards.html index 244ae54..68d24e9 100644 --- a/connectors/templates/connectors/_connector_cards.html +++ b/connectors/templates/connectors/_connector_cards.html @@ -78,6 +78,8 @@