From 7d53a68555d76cf9e455fe25ac33ceb2506b2213 Mon Sep 17 00:00:00 2001 From: riponcm <86886711+riponcm@users.noreply.github.com> Date: Mon, 9 Nov 2026 16:34:11 -0700 Subject: [PATCH] People mapping: links hold both profile URLs and speaker {title, url} objects Session details indexed speaker links as objects while the profile fields mapped links as keyword, so a full people reload rejected 362 speakers. links is now an object with enabled false: stored, never searched. --- backend/app/indices.py | 3 ++- backend/tests/test_data.py | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/app/indices.py b/backend/app/indices.py index 3f04028..4e747ac 100644 --- a/backend/app/indices.py +++ b/backend/app/indices.py @@ -17,7 +17,8 @@ "projects": {"type": "keyword"}, "tracks": {"type": "keyword"}, "looking_for": {"type": "text"}, - "links": {"type": "keyword", "index": False}, + # Stored, never searched: profile links are URL strings, speaker links are {title, url} objects. + "links": {"type": "object", "enabled": False}, "visibility": {"type": "keyword"}, "updated_at": LOCAL_TIME, } diff --git a/backend/tests/test_data.py b/backend/tests/test_data.py index c09521e..f6fa100 100644 --- a/backend/tests/test_data.py +++ b/backend/tests/test_data.py @@ -74,3 +74,12 @@ def test_emma_monday(sessions): assert items["emma-coffee-alice"]["with_id"] == "alice" assert items["emma-lunch-request"]["status"] == "pending" assert all(i["sample"] for i in items.values()) + + +def test_people_links_mapping_accepts_profile_and_speaker_links(): + """Profile links are URL strings and speaker links are {title, url}; one mapping must hold both.""" + from app.config import settings + from app.indices import MAPPINGS + + links = MAPPINGS[settings.idx_people]["properties"]["links"] + assert links == {"type": "object", "enabled": False}