diff --git a/readthedocs/proxito/tests/responses/v1.json b/readthedocs/proxito/tests/responses/v1.json index ad46991c33f..efd1e1107d6 100644 --- a/readthedocs/proxito/tests/responses/v1.json +++ b/readthedocs/proxito/tests/responses/v1.json @@ -156,9 +156,7 @@ "search": { "enabled": true, "default_filter": "project:project/latest", - "filters": [ - ["Include subprojects", "subprojects:project/latest"] - ] + "filters": [] } } } diff --git a/readthedocs/proxito/views/hosting.py b/readthedocs/proxito/views/hosting.py index 51174fbab55..b74f9c4ab71 100644 --- a/readthedocs/proxito/views/hosting.py +++ b/readthedocs/proxito/views/hosting.py @@ -477,12 +477,22 @@ def _v1(self, project, version, build, filename, url, request): }, "search": { "enabled": project.addons.search_enabled, - # TODO: figure it out where this data comes from + # TODO: figure it out where this data comes from. + # + # Originally, this was thought to be customizable by the user + # adding these filters from the Admin UI. + # + # I'm removing this feature for now until we implement it correctly. "filters": [ - [ - "Include subprojects", - f"subprojects:{project.slug}/{version.slug}", - ], + # NOTE: this is an example of the structure of the this object. + # It contains the name of the filter and the search syntax to prepend + # to the user's query. + # It uses "Search query sintax": + # https://docs.readthedocs.io/en/stable/server-side-search/syntax.html + # [ + # "Include subprojects", + # f"subprojects:{project.slug}/{version.slug}", + # ], ] if version else [],