From 5a53b7b9f0a3fb9ac4b2bc3f1c8e85cbaca41dd4 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 2 Jan 2024 10:16:08 -0500 Subject: [PATCH] Search: fix default for search.ranking when indexing (#10945) This only happens if the project doesn't have a configuration file attached to it (even the default one we create when the project doesn't have one). So, this actually happening is very rare, probably the build wasn't updated before the search index was triggered. Ref https://read-the-docs.sentry.io/issues/4701432554/?project=148442&query=is%3Aunresolved+firstSeen%3A-4h&referrer=issue-stream&statsPeriod=24h&stream_index=0 --- readthedocs/projects/tasks/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/projects/tasks/search.py b/readthedocs/projects/tasks/search.py index 0423b2fe403..4168fb61c8d 100644 --- a/readthedocs/projects/tasks/search.py +++ b/readthedocs/projects/tasks/search.py @@ -45,7 +45,7 @@ def index_build(build_id): build_config = build.config or {} search_config = build_config.get("search", {}) - search_ranking = search_config.get("ranking", []) + search_ranking = search_config.get("ranking", {}) search_ignore = search_config.get("ignore", []) try: