Skip to content

Commit b06d298

Browse files
committed
Remove excluding files on search.
This was causing issues excluding some valid user documentation pages
1 parent 70d4cc2 commit b06d298

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

readthedocs/search/documents.py

+14-11
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,22 @@ def get_queryset(self):
9090
"""Overwrite default queryset to filter certain files to index"""
9191
queryset = super(PageDocument, self).get_queryset()
9292

93-
# Exclude some files to not index
94-
excluded_files = [
95-
'search.html',
96-
'genindex.html',
97-
'py-modindex.html',
98-
'search/index.html',
99-
'genindex/index.html',
100-
'py-modindex/index.html',
101-
]
10293

10394
# Do not index files that belong to non sphinx project
10495
# Also do not index certain files
10596
queryset = queryset.filter(project__documentation_type__contains='sphinx')
106-
for ending in excluded_files:
107-
queryset = queryset.exclude(path__endswith=ending)
97+
98+
# TODO: Make this smarter
99+
# This was causing issues excluding some valid user documentation pages
100+
# excluded_files = [
101+
# 'search.html',
102+
# 'genindex.html',
103+
# 'py-modindex.html',
104+
# 'search/index.html',
105+
# 'genindex/index.html',
106+
# 'py-modindex/index.html',
107+
# ]
108+
# for ending in excluded_files:
109+
# queryset = queryset.exclude(path=ending)
110+
108111
return queryset

0 commit comments

Comments
 (0)