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}