prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  On the search page, the "more options" feature is broken on the "contributors" filter
  ## Bug Report
  
  **Problematic behavior/code**
  The "more options" feature on the "contributors" filter on the search page is broken.
  
  **Expected Behavior**
  When we click on "more options" on the "contributors" filter on the search page, we expect to see a list of more contributors and be able to type a search request to refine the search and find a specific contributor by his/her first/lastname.
  
  **Steps to Reproduce**
  1. Go to the search page: https://www.fun-mooc.fr/en/courses/
  2. Click "more options" on the "contributors" filter
  
  **Environment**
  - Richie version: 2.5.0
  - Platform: docker
  
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/richie/apps/search/defaults.py`
  Content:
  ```
  1 """
  2 Import custom settings and set up defaults for values the Search app needs
  3 """
  4 from django.conf import settings
  5 from django.utils.functional import lazy
  6 from django.utils.translation import gettext_lazy as _
  7 
  8 # Elasticsearch
  9 ES_CHUNK_SIZE = 500
  10 ES_PAGE_SIZE = 10
  11 
  12 # Use a lazy to enable easier testing by not defining the value at bootstrap time
  13 ES_INDICES_PREFIX = lazy(
  14     lambda: getattr(settings, "RICHIE_ES_INDICES_PREFIX", "richie")
  15 )()
  16 
  17 # Define which analyzer should be used for each language
  18 QUERY_ANALYZERS = getattr(
  19     settings, "RICHIE_QUERY_ANALYZERS", {"en": "english", "fr": "french"}
  20 )
  21 
  22 # Define the scoring boost (in ElasticSearch) related value names receive when using
  23 # full-text search.
  24 # For example, when a user searches for "Science" in full-text, it should match any
  25 # course whose category contains "Science" or a related word, albeit with a lower
  26 # score than courses that include it in their title or description.
  27 # This lower score factor is the boost value we get or set here.
  28 RELATED_CONTENT_BOOST = 0.05
  29 
  30 FACET_SORTING_DEFAULT = "count"
  31 
  32 FACET_COUNTS_DEFAULT_LIMIT = getattr(settings, "RICHIE_FACET_COUNTS_DEFAULT_LIMIT", 10)
  33 FACET_COUNTS_MAX_LIMIT = getattr(settings, "RICHIE_FACET_COUNTS_MAX_LIMIT", 50)
  34 
  35 ES_STATE_WEIGHTS = getattr(settings, "RICHIE_ES_STATE_WEIGHTS", None) or [
  36     80,  # ONGOING_OPEN
  37     70,  # FUTURE_OPEN
  38     60,  # ARCHIVED_OPEN
  39     30,  # FUTURE_NOT_YET_OPEN
  40     6,  # FUTURE_CLOSED
  41     5,  # ONGOING_CLOSED
  42     1,  # ARCHIVED_CLOSED
  43 ]
  44 
  45 FILTERS_CONFIGURATION = [
  46     (
  47         "richie.apps.search.filter_definitions.StaticChoicesFilterDefinition",
  48         {
  49             "fragment_map": {"new": [{"term": {"is_new": True}}]},
  50             "human_name": _("New courses"),
  51             "min_doc_count": 0,
  52             "name": "new",
  53             "position": 0,
  54             "sorting": "conf",
  55             "values": {"new": _("First session")},
  56         },
  57     ),
  58     (
  59         "richie.apps.search.filter_definitions.NestingWrapper",
  60         {
  61             "name": "course_runs",
  62             "filters": [
  63                 (
  64                     "richie.apps.search.filter_definitions.AvailabilityFilterDefinition",
  65                     {
  66                         "human_name": _("Availability"),
  67                         "is_drilldown": True,
  68                         "min_doc_count": 0,
  69                         "name": "availability",
  70                         "position": 1,
  71                         "sorting": "conf",
  72                     },
  73                 ),
  74                 (
  75                     "richie.apps.search.filter_definitions.LanguagesFilterDefinition",
  76                     {
  77                         "human_name": _("Languages"),
  78                         # There are too many available languages to show them all, all the time.
  79                         # Eg. 200 languages, 190+ of which will have 0 matching courses.
  80                         "min_doc_count": 1,
  81                         "name": "languages",
  82                         "position": 5,
  83                     },
  84                 ),
  85             ],
  86         },
  87     ),
  88     (
  89         "richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition",
  90         {
  91             "human_name": _("Subjects"),
  92             "is_autocompletable": True,
  93             "is_searchable": True,
  94             "min_doc_count": 0,
  95             "name": "subjects",
  96             "position": 2,
  97             "reverse_id": "subjects",
  98             "term": "categories",
  99         },
  100     ),
  101     (
  102         "richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition",
  103         {
  104             "human_name": _("Levels"),
  105             "is_autocompletable": True,
  106             "is_searchable": True,
  107             "min_doc_count": 0,
  108             "name": "levels",
  109             "position": 3,
  110             "reverse_id": "levels",
  111             "term": "categories",
  112         },
  113     ),
  114     (
  115         "richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition",
  116         {
  117             "human_name": _("Organizations"),
  118             "is_autocompletable": True,
  119             "is_searchable": True,
  120             "min_doc_count": 0,
  121             "name": "organizations",
  122             "position": 4,
  123             "reverse_id": "organizations",
  124         },
  125     ),
  126     (
  127         "richie.apps.search.filter_definitions.IndexableFilterDefinition",
  128         {
  129             "human_name": _("Persons"),
  130             "is_autocompletable": True,
  131             "is_searchable": True,
  132             "min_doc_count": 0,
  133             "name": "persons",
  134             "position": 5,
  135             "reverse_id": "persons",
  136         },
  137     ),
  138 ]
  139
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/richie/apps/search/defaults.py b/src/richie/apps/search/defaults.py
  --- a/src/richie/apps/search/defaults.py
  +++ b/src/richie/apps/search/defaults.py
  @@ -118,6 +118,8 @@
               "is_autocompletable": True,
               "is_searchable": True,
               "min_doc_count": 0,
  +            # Note: this is a special name that connects the filter to Organization objects
  +            # in Richie as well was the corresponding indexer and API endpoint.
               "name": "organizations",
               "position": 4,
               "reverse_id": "organizations",
  @@ -130,6 +132,8 @@
               "is_autocompletable": True,
               "is_searchable": True,
               "min_doc_count": 0,
  +            # Note: this is a special name that connects the filter to Person objects
  +            # in Richie as well was the corresponding indexer and API endpoint.
               "name": "persons",
               "position": 5,
               "reverse_id": "persons",
  
verification_info: {"golden_diff": "diff --git a/src/richie/apps/search/defaults.py b/src/richie/apps/search/defaults.py\n--- a/src/richie/apps/search/defaults.py\n+++ b/src/richie/apps/search/defaults.py\n@@ -118,6 +118,8 @@\n             \"is_autocompletable\": True,\n             \"is_searchable\": True,\n             \"min_doc_count\": 0,\n+            # Note: this is a special name that connects the filter to Organization objects\n+            # in Richie as well was the corresponding indexer and API endpoint.\n             \"name\": \"organizations\",\n             \"position\": 4,\n             \"reverse_id\": \"organizations\",\n@@ -130,6 +132,8 @@\n             \"is_autocompletable\": True,\n             \"is_searchable\": True,\n             \"min_doc_count\": 0,\n+            # Note: this is a special name that connects the filter to Person objects\n+            # in Richie as well was the corresponding indexer and API endpoint.\n             \"name\": \"persons\",\n             \"position\": 5,\n             \"reverse_id\": \"persons\",\n", "issue": "On the search page, the \"more options\" feature is broken on the \"contributors\" filter\n## Bug Report\r\n\r\n**Problematic behavior/code**\r\nThe \"more options\" feature on the \"contributors\" filter on the search page is broken.\r\n\r\n**Expected Behavior**\r\nWhen we click on \"more options\" on the \"contributors\" filter on the search page, we expect to see a list of more contributors and be able to type a search request to refine the search and find a specific contributor by his/her first/lastname.\r\n\r\n**Steps to Reproduce**\r\n1. Go to the search page: https://www.fun-mooc.fr/en/courses/\r\n2. Click \"more options\" on the \"contributors\" filter\r\n\r\n**Environment**\r\n- Richie version: 2.5.0\r\n- Platform: docker\r\n\r\n\r\n\n", "before_files": [{"content": "\"\"\"\nImport custom settings and set up defaults for values the Search app needs\n\"\"\"\nfrom django.conf import settings\nfrom django.utils.functional import lazy\nfrom django.utils.translation import gettext_lazy as _\n\n# Elasticsearch\nES_CHUNK_SIZE = 500\nES_PAGE_SIZE = 10\n\n# Use a lazy to enable easier testing by not defining the value at bootstrap time\nES_INDICES_PREFIX = lazy(\n    lambda: getattr(settings, \"RICHIE_ES_INDICES_PREFIX\", \"richie\")\n)()\n\n# Define which analyzer should be used for each language\nQUERY_ANALYZERS = getattr(\n    settings, \"RICHIE_QUERY_ANALYZERS\", {\"en\": \"english\", \"fr\": \"french\"}\n)\n\n# Define the scoring boost (in ElasticSearch) related value names receive when using\n# full-text search.\n# For example, when a user searches for \"Science\" in full-text, it should match any\n# course whose category contains \"Science\" or a related word, albeit with a lower\n# score than courses that include it in their title or description.\n# This lower score factor is the boost value we get or set here.\nRELATED_CONTENT_BOOST = 0.05\n\nFACET_SORTING_DEFAULT = \"count\"\n\nFACET_COUNTS_DEFAULT_LIMIT = getattr(settings, \"RICHIE_FACET_COUNTS_DEFAULT_LIMIT\", 10)\nFACET_COUNTS_MAX_LIMIT = getattr(settings, \"RICHIE_FACET_COUNTS_MAX_LIMIT\", 50)\n\nES_STATE_WEIGHTS = getattr(settings, \"RICHIE_ES_STATE_WEIGHTS\", None) or [\n    80,  # ONGOING_OPEN\n    70,  # FUTURE_OPEN\n    60,  # ARCHIVED_OPEN\n    30,  # FUTURE_NOT_YET_OPEN\n    6,  # FUTURE_CLOSED\n    5,  # ONGOING_CLOSED\n    1,  # ARCHIVED_CLOSED\n]\n\nFILTERS_CONFIGURATION = [\n    (\n        \"richie.apps.search.filter_definitions.StaticChoicesFilterDefinition\",\n        {\n            \"fragment_map\": {\"new\": [{\"term\": {\"is_new\": True}}]},\n            \"human_name\": _(\"New courses\"),\n            \"min_doc_count\": 0,\n            \"name\": \"new\",\n            \"position\": 0,\n            \"sorting\": \"conf\",\n            \"values\": {\"new\": _(\"First session\")},\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.NestingWrapper\",\n        {\n            \"name\": \"course_runs\",\n            \"filters\": [\n                (\n                    \"richie.apps.search.filter_definitions.AvailabilityFilterDefinition\",\n                    {\n                        \"human_name\": _(\"Availability\"),\n                        \"is_drilldown\": True,\n                        \"min_doc_count\": 0,\n                        \"name\": \"availability\",\n                        \"position\": 1,\n                        \"sorting\": \"conf\",\n                    },\n                ),\n                (\n                    \"richie.apps.search.filter_definitions.LanguagesFilterDefinition\",\n                    {\n                        \"human_name\": _(\"Languages\"),\n                        # There are too many available languages to show them all, all the time.\n                        # Eg. 200 languages, 190+ of which will have 0 matching courses.\n                        \"min_doc_count\": 1,\n                        \"name\": \"languages\",\n                        \"position\": 5,\n                    },\n                ),\n            ],\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Subjects\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"subjects\",\n            \"position\": 2,\n            \"reverse_id\": \"subjects\",\n            \"term\": \"categories\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Levels\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"levels\",\n            \"position\": 3,\n            \"reverse_id\": \"levels\",\n            \"term\": \"categories\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Organizations\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"organizations\",\n            \"position\": 4,\n            \"reverse_id\": \"organizations\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableFilterDefinition\",\n        {\n            \"human_name\": _(\"Persons\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"persons\",\n            \"position\": 5,\n            \"reverse_id\": \"persons\",\n        },\n    ),\n]\n", "path": "src/richie/apps/search/defaults.py"}], "after_files": [{"content": "\"\"\"\nImport custom settings and set up defaults for values the Search app needs\n\"\"\"\nfrom django.conf import settings\nfrom django.utils.functional import lazy\nfrom django.utils.translation import gettext_lazy as _\n\n# Elasticsearch\nES_CHUNK_SIZE = 500\nES_PAGE_SIZE = 10\n\n# Use a lazy to enable easier testing by not defining the value at bootstrap time\nES_INDICES_PREFIX = lazy(\n    lambda: getattr(settings, \"RICHIE_ES_INDICES_PREFIX\", \"richie\")\n)()\n\n# Define which analyzer should be used for each language\nQUERY_ANALYZERS = getattr(\n    settings, \"RICHIE_QUERY_ANALYZERS\", {\"en\": \"english\", \"fr\": \"french\"}\n)\n\n# Define the scoring boost (in ElasticSearch) related value names receive when using\n# full-text search.\n# For example, when a user searches for \"Science\" in full-text, it should match any\n# course whose category contains \"Science\" or a related word, albeit with a lower\n# score than courses that include it in their title or description.\n# This lower score factor is the boost value we get or set here.\nRELATED_CONTENT_BOOST = 0.05\n\nFACET_SORTING_DEFAULT = \"count\"\n\nFACET_COUNTS_DEFAULT_LIMIT = getattr(settings, \"RICHIE_FACET_COUNTS_DEFAULT_LIMIT\", 10)\nFACET_COUNTS_MAX_LIMIT = getattr(settings, \"RICHIE_FACET_COUNTS_MAX_LIMIT\", 50)\n\nES_STATE_WEIGHTS = getattr(settings, \"RICHIE_ES_STATE_WEIGHTS\", None) or [\n    80,  # ONGOING_OPEN\n    70,  # FUTURE_OPEN\n    60,  # ARCHIVED_OPEN\n    30,  # FUTURE_NOT_YET_OPEN\n    6,  # FUTURE_CLOSED\n    5,  # ONGOING_CLOSED\n    1,  # ARCHIVED_CLOSED\n]\n\nFILTERS_CONFIGURATION = [\n    (\n        \"richie.apps.search.filter_definitions.StaticChoicesFilterDefinition\",\n        {\n            \"fragment_map\": {\"new\": [{\"term\": {\"is_new\": True}}]},\n            \"human_name\": _(\"New courses\"),\n            \"min_doc_count\": 0,\n            \"name\": \"new\",\n            \"position\": 0,\n            \"sorting\": \"conf\",\n            \"values\": {\"new\": _(\"First session\")},\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.NestingWrapper\",\n        {\n            \"name\": \"course_runs\",\n            \"filters\": [\n                (\n                    \"richie.apps.search.filter_definitions.AvailabilityFilterDefinition\",\n                    {\n                        \"human_name\": _(\"Availability\"),\n                        \"is_drilldown\": True,\n                        \"min_doc_count\": 0,\n                        \"name\": \"availability\",\n                        \"position\": 1,\n                        \"sorting\": \"conf\",\n                    },\n                ),\n                (\n                    \"richie.apps.search.filter_definitions.LanguagesFilterDefinition\",\n                    {\n                        \"human_name\": _(\"Languages\"),\n                        # There are too many available languages to show them all, all the time.\n                        # Eg. 200 languages, 190+ of which will have 0 matching courses.\n                        \"min_doc_count\": 1,\n                        \"name\": \"languages\",\n                        \"position\": 5,\n                    },\n                ),\n            ],\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Subjects\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"subjects\",\n            \"position\": 2,\n            \"reverse_id\": \"subjects\",\n            \"term\": \"categories\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Levels\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            \"name\": \"levels\",\n            \"position\": 3,\n            \"reverse_id\": \"levels\",\n            \"term\": \"categories\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableHierarchicalFilterDefinition\",\n        {\n            \"human_name\": _(\"Organizations\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            # Note: this is a special name that connects the filter to Organization objects\n            # in Richie as well was the corresponding indexer and API endpoint.\n            \"name\": \"organizations\",\n            \"position\": 4,\n            \"reverse_id\": \"organizations\",\n        },\n    ),\n    (\n        \"richie.apps.search.filter_definitions.IndexableFilterDefinition\",\n        {\n            \"human_name\": _(\"Persons\"),\n            \"is_autocompletable\": True,\n            \"is_searchable\": True,\n            \"min_doc_count\": 0,\n            # Note: this is a special name that connects the filter to Person objects\n            # in Richie as well was the corresponding indexer and API endpoint.\n            \"name\": \"persons\",\n            \"position\": 5,\n            \"reverse_id\": \"persons\",\n        },\n    ),\n]\n", "path": "src/richie/apps/search/defaults.py"}]}